mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-21 04:01:30 +01:00
f8dbfdd59d
Summary: Created with spatch: lang=diff - phutil_render_tag + phutil_tag (X, Y) (and null manually) Test Plan: Loaded homepage Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4500
38 lines
807 B
PHP
38 lines
807 B
PHP
<?php
|
|
|
|
final class AphrontFormImageControl extends AphrontFormControl {
|
|
|
|
protected function getCustomControlClass() {
|
|
return 'aphront-form-control-image';
|
|
}
|
|
|
|
protected function renderInput() {
|
|
$id = celerity_generate_unique_node_id();
|
|
|
|
return
|
|
phutil_tag(
|
|
'input',
|
|
array(
|
|
'type' => 'file',
|
|
'name' => $this->getName(),
|
|
'class' => 'image',
|
|
)).
|
|
'<div style="clear: both;">'.
|
|
phutil_tag(
|
|
'input',
|
|
array(
|
|
'type' => 'checkbox',
|
|
'name' => 'default_image',
|
|
'class' => 'default-image',
|
|
'id' => $id,
|
|
)).
|
|
phutil_render_tag(
|
|
'label',
|
|
array(
|
|
'for' => $id,
|
|
),
|
|
'Use Default Image instead').
|
|
'</div>';
|
|
}
|
|
|
|
}
|