Path: blob/master/src/view/form/control/AphrontFormTextWithSubmitControl.php
12262 views
<?php12final class AphrontFormTextWithSubmitControl extends AphrontFormControl {34private $submitLabel;56public function setSubmitLabel($submit_label) {7$this->submitLabel = $submit_label;8return $this;9}1011public function getSubmitLabel() {12return $this->submitLabel;13}1415protected function getCustomControlClass() {16return 'aphront-form-control-text-with-submit';17}1819protected function renderInput() {20return phutil_tag(21'div',22array(23'class' => 'text-with-submit-control-outer-bounds',24),25array(26phutil_tag(27'div',28array(29'class' => 'text-with-submit-control-text-bounds',30),31javelin_tag(32'input',33array(34'type' => 'text',35'class' => 'text-with-submit-control-text',36'name' => $this->getName(),37'value' => $this->getValue(),38'disabled' => $this->getDisabled() ? 'disabled' : null,39'id' => $this->getID(),40))),41phutil_tag(42'div',43array(44'class' => 'text-with-submit-control-submit-bounds',45),46javelin_tag(47'input',48array(49'type' => 'submit',50'class' => 'text-with-submit-control-submit grey',51'value' => coalesce($this->getSubmitLabel(), pht('Submit')),52))),53));54}5556}575859