Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/PhabricatorRemarkupControl.php
| <?php | <?php | ||||
| final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { | final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { | ||||
| private $disableMacro = false; | private $disableMacro = false; | ||||
| private $disableFullScreen = false; | private $disableFullScreen = false; | ||||
| private $canPin; | private $canPin; | ||||
| private $sendOnEnter = false; | |||||
| public function setDisableMacros($disable) { | public function setDisableMacros($disable) { | ||||
| $this->disableMacro = $disable; | $this->disableMacro = $disable; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setDisableFullScreen($disable) { | public function setDisableFullScreen($disable) { | ||||
| $this->disableFullScreen = $disable; | $this->disableFullScreen = $disable; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setCanPin($can_pin) { | public function setCanPin($can_pin) { | ||||
| $this->canPin = $can_pin; | $this->canPin = $can_pin; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getCanPin() { | public function getCanPin() { | ||||
| return $this->canPin; | return $this->canPin; | ||||
| } | } | ||||
| public function setSendOnEnter($soe) { | |||||
| $this->sendOnEnter = $soe; | |||||
| return $this; | |||||
| } | |||||
| public function getSendOnEnter() { | |||||
| return $this->sendOnEnter; | |||||
| } | |||||
| protected function renderInput() { | protected function renderInput() { | ||||
| $id = $this->getID(); | $id = $this->getID(); | ||||
| if (!$id) { | if (!$id) { | ||||
| $id = celerity_generate_unique_node_id(); | $id = celerity_generate_unique_node_id(); | ||||
| $this->setID($id); | $this->setID($id); | ||||
| } | } | ||||
| $viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
| Show All 37 Lines | Javelin::initBehavior( | ||||
| 'Quoted Text' => pht('Quoted Text'), | 'Quoted Text' => pht('Quoted Text'), | ||||
| 'data' => pht('data'), | 'data' => pht('data'), | ||||
| 'name' => pht('name'), | 'name' => pht('name'), | ||||
| 'URL' => pht('URL'), | 'URL' => pht('URL'), | ||||
| 'key-help' => pht('Pin or unpin the comment form.'), | 'key-help' => pht('Pin or unpin the comment form.'), | ||||
| ), | ), | ||||
| 'canPin' => $this->getCanPin(), | 'canPin' => $this->getCanPin(), | ||||
| 'disabled' => $this->getDisabled(), | 'disabled' => $this->getDisabled(), | ||||
| 'sendOnEnter' => $this->getSendOnEnter(), | |||||
| 'rootID' => $root_id, | 'rootID' => $root_id, | ||||
| 'autocompleteMap' => (object)array( | 'autocompleteMap' => (object)array( | ||||
| 64 => array( // "@" | 64 => array( // "@" | ||||
| 'datasourceURI' => $user_datasource->getDatasourceURI(), | 'datasourceURI' => $user_datasource->getDatasourceURI(), | ||||
| 'headerIcon' => 'fa-user', | 'headerIcon' => 'fa-user', | ||||
| 'headerText' => pht('Find User:'), | 'headerText' => pht('Find User:'), | ||||
| 'hintText' => $user_datasource->getPlaceholderText(), | 'hintText' => $user_datasource->getPlaceholderText(), | ||||
| ), | ), | ||||
| ▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines | |||||