1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-01 17:38:24 +01:00
phorge-phorge/src/view/form/control/AphrontFormImageControl.php

39 lines
821 B
PHP
Raw Normal View History

<?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_render_tag(
'input',
array(
'type' => 'file',
'name' => $this->getName(),
'class' => 'image',
)).
'<div style="clear: both;">'.
phutil_render_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>';
}
}