@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 33 lines 769 B view raw
1<?php 2 3final class PHUIFormFreeformDateControl extends AphrontFormControl { 4 5 private $readOnly; 6 7 public function setReadOnly($read_only) { 8 $this->readOnly = $read_only; 9 return $this; 10 } 11 12 protected function getReadOnly() { 13 return $this->readOnly; 14 } 15 16 protected function getCustomControlClass() { 17 return 'aphront-form-control-text'; 18 } 19 20 protected function renderInput() { 21 return javelin_tag( 22 'input', 23 array( 24 'type' => 'text', 25 'name' => $this->getName(), 26 'value' => $this->getValue(), 27 'disabled' => $this->getDisabled() ? 'disabled' : null, 28 'readonly' => $this->getReadOnly() ? 'readonly' : null, 29 'id' => $this->getID(), 30 )); 31 } 32 33}