Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/PhabricatorRemarkupControl.php
Show All 18 Lines | 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(); | ||||
if (!$viewer) { | if (!$viewer) { | ||||
throw new Exception( | throw new PhutilInvalidStateException('setUser'); | ||||
pht( | |||||
'Call %s before rendering a %s!', | |||||
'setUser()', | |||||
__CLASS__)); | |||||
} | } | ||||
// We need to have this if previews render images, since Ajax can not | // We need to have this if previews render images, since Ajax can not | ||||
// currently ship JS or CSS. | // currently ship JS or CSS. | ||||
require_celerity_resource('lightbox-attachment-css'); | require_celerity_resource('lightbox-attachment-css'); | ||||
Javelin::initBehavior( | Javelin::initBehavior( | ||||
'aphront-drag-and-drop-textarea', | 'aphront-drag-and-drop-textarea', | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |