mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
a22bea2a74
Summary: Mostly applies a new call spacing rule; also a few things that have slipped through via pull requests and such Test Plan: `find src/ -type f -name '*.php' | xargs -n16 arc lint --output summary --apply-patches` Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D5002
40 lines
953 B
PHP
40 lines
953 B
PHP
<?php
|
|
|
|
final class ConpherenceFormDragAndDropUploadControl extends AphrontFormControl {
|
|
|
|
private $dropID;
|
|
|
|
public function setDropID($drop_id) {
|
|
$this->dropID = $drop_id;
|
|
return $this;
|
|
}
|
|
public function getDropID() {
|
|
return $this->dropID;
|
|
}
|
|
|
|
protected function getCustomControlClass() {
|
|
return null;
|
|
}
|
|
|
|
protected function renderInput() {
|
|
|
|
$drop_id = celerity_generate_unique_node_id();
|
|
Javelin::initBehavior('conpherence-drag-and-drop-photo',
|
|
array(
|
|
'target' => $drop_id,
|
|
'form_pane' => 'conpherence-form',
|
|
'upload_uri' => '/file/dropupload/',
|
|
'activated_class' => 'conpherence-dialogue-upload-photo',
|
|
));
|
|
require_celerity_resource('conpherence-update-css');
|
|
|
|
return phutil_tag(
|
|
'div',
|
|
array(
|
|
'id' => $drop_id,
|
|
'class' => 'conpherence-dialogue-drag-photo',
|
|
),
|
|
pht('Drag and drop an image here to upload it.'));
|
|
}
|
|
|
|
}
|