Page MenuHomePhabricator

D9223.id21906.diff
No OneTemporary

D9223.id21906.diff

diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
@@ -54,6 +54,16 @@
return true;
}
+ private function getPlaceholder() {
+ return $this->getFieldConfigValue('placeholder', null);
+ }
+
+ public function renderEditControl(array $handles) {
+ $control = parent::renderEditControl($handles);
+ $control->setPlaceholder($this->getPlaceholder());
+ return $control;
+ }
+
public function getHeraldFieldConditions() {
return array(
HeraldAdapter::CONDITION_CONTAINS,
diff --git a/src/view/form/control/AphrontFormTextControl.php b/src/view/form/control/AphrontFormTextControl.php
--- a/src/view/form/control/AphrontFormTextControl.php
+++ b/src/view/form/control/AphrontFormTextControl.php
@@ -4,18 +4,30 @@
private $disableAutocomplete;
private $sigil;
+ private $placeholder;
public function setDisableAutocomplete($disable) {
$this->disableAutocomplete = $disable;
return $this;
}
+
private function getDisableAutocomplete() {
return $this->disableAutocomplete;
}
+ public function getPlaceholder() {
+ return $this->placeholder;
+ }
+
+ public function setPlaceholder($placeholder) {
+ $this->placeholder = $placeholder;
+ return $this;
+ }
+
public function getSigil() {
return $this->sigil;
}
+
public function setSigil($sigil) {
$this->sigil = $sigil;
return $this;
@@ -36,6 +48,7 @@
'autocomplete' => $this->getDisableAutocomplete() ? 'off' : null,
'id' => $this->getID(),
'sigil' => $this->getSigil(),
+ 'placeholder' => $this->getPlaceholder()
));
}

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 25, 2:14 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719321
Default Alt Text
D9223.id21906.diff (1 KB)

Event Timeline