2012-01-25 20:23:00 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @group maniphest
|
|
|
|
*/
|
2012-03-10 00:46:25 +01:00
|
|
|
final class ManiphestTaskDescriptionPreviewController
|
|
|
|
extends ManiphestController {
|
2012-01-25 20:23:00 +01:00
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
$request = $this->getRequest();
|
|
|
|
$description = $request->getStr('description');
|
|
|
|
|
2012-07-11 20:40:10 +02:00
|
|
|
$task = new ManiphestTask();
|
|
|
|
$task->setDescription($description);
|
|
|
|
|
|
|
|
$output = PhabricatorMarkupEngine::renderOneObject(
|
|
|
|
$task,
|
2012-09-05 20:40:48 +02:00
|
|
|
ManiphestTask::MARKUP_FIELD_DESCRIPTION,
|
|
|
|
$request->getUser());
|
2012-01-25 20:23:00 +01:00
|
|
|
|
2013-02-13 23:08:57 +01:00
|
|
|
$content =
|
|
|
|
'<div class="phabricator-remarkup">'.
|
|
|
|
$output.
|
|
|
|
'</div>';
|
2012-01-25 20:23:00 +01:00
|
|
|
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
|
|
->setContent($content);
|
|
|
|
}
|
|
|
|
}
|