1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Custom fields: Render 'required' for tokenizer fields

Summary: When building a tokenizer-based edit control for a custom field (e.g. a datasource type), preserve a field validation error whilst building edit controls.

Test Plan:
  - Create custom datasource field, set it to required
  - Observe that 'Required' does not appear next to control
  - Apply patch
  - Observe 'Required' appears next to control

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D17592
This commit is contained in:
Daniel Stone 2017-04-02 15:26:26 +00:00 committed by fooishbar
parent 4d29d8e2b7
commit 1c5503cb29

View file

@ -14,6 +14,7 @@ abstract class PhabricatorStandardCustomFieldTokenizer
->setName($this->getFieldKey())
->setDatasource($this->getDatasource())
->setCaption($this->getCaption())
->setError($this->getFieldError())
->setValue(nonempty($value, array()));
$limit = $this->getFieldConfigValue('limit');