Add a basic "harbormaster.step.edit" API method
[phabricator/blender.git] / src / view / form / control / AphrontFormTextWithSubmitControl.php
blob07b872d1fe0cc8ca9a9cba87eb327df26107fac5
1 <?php
3 final class AphrontFormTextWithSubmitControl extends AphrontFormControl {
5 private $submitLabel;
7 public function setSubmitLabel($submit_label) {
8 $this->submitLabel = $submit_label;
9 return $this;
12 public function getSubmitLabel() {
13 return $this->submitLabel;
16 protected function getCustomControlClass() {
17 return 'aphront-form-control-text-with-submit';
20 protected function renderInput() {
21 return phutil_tag(
22 'div',
23 array(
24 'class' => 'text-with-submit-control-outer-bounds',
26 array(
27 phutil_tag(
28 'div',
29 array(
30 'class' => 'text-with-submit-control-text-bounds',
32 javelin_tag(
33 'input',
34 array(
35 'type' => 'text',
36 'class' => 'text-with-submit-control-text',
37 'name' => $this->getName(),
38 'value' => $this->getValue(),
39 'disabled' => $this->getDisabled() ? 'disabled' : null,
40 'id' => $this->getID(),
41 ))),
42 phutil_tag(
43 'div',
44 array(
45 'class' => 'text-with-submit-control-submit-bounds',
47 javelin_tag(
48 'input',
49 array(
50 'type' => 'submit',
51 'class' => 'text-with-submit-control-submit grey',
52 'value' => coalesce($this->getSubmitLabel(), pht('Submit')),
53 ))),
54 ));