1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Allow setting of "required":false in CustomFields

Summary: Fixes T6265, allows you to pass required:false as a parameter.

Test Plan: Add required:false to a field, no longer see "Required"

Reviewers: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6265

Differential Revision: https://secure.phabricator.com/D10659
This commit is contained in:
Chad Little 2014-10-07 16:23:12 -07:00
parent 89a6ed98e7
commit 91549bb81d

View file

@ -107,8 +107,10 @@ abstract class PhabricatorStandardCustomField
$this->setCaption($value);
break;
case 'required':
$this->setRequired($value);
$this->setFieldError(true);
if ($value) {
$this->setRequired($value);
$this->setFieldError(true);
}
break;
case 'default':
$this->setFieldValue($value);