Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92789616
ConpherenceFormDragAndDropUploadControl.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 23, 17:58
Size
953 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 17:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22514855
Attached To
rPH Phabricator
ConpherenceFormDragAndDropUploadControl.php
View Options
<?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.'
));
}
}
Event Timeline
Log In to Comment