Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13999331
D9223.id21906.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9223.id21906.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9223: Added placeholder support to custom text fields
Attached
Detach File
Event Timeline
Log In to Comment