Differential D8812 Diff 20916 src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
| Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | private function buildCommentForm(PhabricatorSlowvotePoll $poll) { | ||||
| $viewer = $this->getRequest()->getUser(); | $viewer = $this->getRequest()->getUser(); | ||||
| $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | ||||
| $add_comment_header = $is_serious | $add_comment_header = $is_serious | ||||
| ? pht('Add Comment') | ? pht('Add Comment') | ||||
| : pht('Enter Deliberations'); | : pht('Enter Deliberations'); | ||||
| $submit_button_name = $is_serious | |||||
| ? pht('Add Comment') | |||||
| : pht('Perhaps'); | |||||
| $draft = PhabricatorDraft::newFromUserAndKey($viewer, $poll->getPHID()); | $draft = PhabricatorDraft::newFromUserAndKey($viewer, $poll->getPHID()); | ||||
| return id(new PhabricatorApplicationTransactionCommentView()) | return id(new PhabricatorApplicationTransactionCommentView()) | ||||
| ->setUser($viewer) | ->setUser($viewer) | ||||
| ->setObjectPHID($poll->getPHID()) | ->setObjectPHID($poll->getPHID()) | ||||
| ->setDraft($draft) | ->setDraft($draft) | ||||
| ->setHeaderText($add_comment_header) | ->setHeaderText($add_comment_header) | ||||
| ->setAction($this->getApplicationURI('/comment/'.$poll->getID().'/')) | ->setAction($this->getApplicationURI('/comment/'.$poll->getID().'/')) | ||||
| ->setSubmitButtonName($submit_button_name); | ->setSubmitButtonName(pht('Add Comment')); | ||||
| } | } | ||||
| } | } | ||||