Differential D13200 Diff 31965 src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php
| Show All 38 Lines | return id(new AphrontFormTextAreaControl()) | ||||
| ->setLabel(pht('Reason')) | ->setLabel(pht('Reason')) | ||||
| ->setName('reason') | ->setName('reason') | ||||
| ->setError($this->error) | ->setError($this->error) | ||||
| ->setValue($this->getValue()); | ->setValue($this->getValue()); | ||||
| } | } | ||||
| public function validate($reason) { | public function validate($reason) { | ||||
| if (!$reason) { | if (!$reason) { | ||||
| $this->error = 'Required'; | $this->error = pht('Required'); | ||||
| throw new ReleephFieldParseException( | throw new ReleephFieldParseException( | ||||
| $this, | $this, | ||||
| pht('You must give a reason for your request.')); | pht('You must give a reason for your request.')); | ||||
| } | } | ||||
| } | } | ||||
| public function renderHelpForArcanist() { | public function renderHelpForArcanist() { | ||||
| $text = pht( | $text = pht( | ||||
| "Fully explain why you are requesting this code be included ". | 'Fully explain why you are requesting this code be included '. | ||||
| "in the next release.\n"); | 'in the next release.')."\n"; | ||||
| return phutil_console_wrap($text, 8); | return phutil_console_wrap($text, 8); | ||||
| } | } | ||||
| public function shouldAppearOnCommitMessage() { | public function shouldAppearOnCommitMessage() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| public function renderLabelForCommitMessage() { | public function renderLabelForCommitMessage() { | ||||
| Show All 21 Lines | |||||