Differential D8812 Diff 20916 src/applications/legalpad/controller/LegalpadDocumentViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/controller/LegalpadDocumentViewController.php
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | private function buildAddCommentView( | ||||
$draft = PhabricatorDraft::newFromUserAndKey($user, $document->getPHID()); | $draft = PhabricatorDraft::newFromUserAndKey($user, $document->getPHID()); | ||||
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | ||||
$title = $is_serious | $title = $is_serious | ||||
? pht('Add Comment') | ? pht('Add Comment') | ||||
: pht('Debate Legislation'); | : pht('Debate Legislation'); | ||||
$button_name = $is_serious | |||||
? pht('Add Comment') | |||||
: pht('Commence Filibuster'); | |||||
$form = id(new PhabricatorApplicationTransactionCommentView()) | $form = id(new PhabricatorApplicationTransactionCommentView()) | ||||
->setUser($user) | ->setUser($user) | ||||
->setObjectPHID($document->getPHID()) | ->setObjectPHID($document->getPHID()) | ||||
->setFormID($comment_form_id) | ->setFormID($comment_form_id) | ||||
->setHeaderText($title) | ->setHeaderText($title) | ||||
->setDraft($draft) | ->setDraft($draft) | ||||
->setSubmitButtonName($button_name) | ->setSubmitButtonName(pht('Add Comment')) | ||||
->setAction($this->getApplicationURI('/comment/'.$document->getID().'/')) | ->setAction($this->getApplicationURI('/comment/'.$document->getID().'/')) | ||||
->setRequestURI($this->getRequest()->getRequestURI()); | ->setRequestURI($this->getRequest()->getRequestURI()); | ||||
return $form; | return $form; | ||||
} | } | ||||
} | } |