@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 29 lines 763 B view raw
1<?php 2 3final class AphrontFormPasswordControl extends AphrontFormControl { 4 5 private $disableAutocomplete; 6 7 public function setDisableAutocomplete($disable_autocomplete) { 8 $this->disableAutocomplete = $disable_autocomplete; 9 return $this; 10 } 11 12 protected function getCustomControlClass() { 13 return 'aphront-form-control-password'; 14 } 15 16 protected function renderInput() { 17 return phutil_tag( 18 'input', 19 array( 20 'type' => 'password', 21 'name' => $this->getName(), 22 'value' => $this->getValue(), 23 'disabled' => $this->getDisabled() ? 'disabled' : null, 24 'autocomplete' => ($this->disableAutocomplete ? 'off' : null), 25 'id' => $this->getID(), 26 )); 27 } 28 29}