1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-21 04:01:30 +01:00
phorge-phorge/src/view/form/control/AphrontFormImageControl.php
vrana f8dbfdd59d Convert phutil_render_tag(X, Y) to phutil_tag
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
2013-01-24 19:08:54 -08:00

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>';
}
}