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
|
|
|
|
|
|
|
$content =
|
2012-03-30 23:12:10 +02:00
|
|
|
'<div class="phabricator-remarkup">'.
|
2012-07-11 20:40:10 +02:00
|
|
|
$output.
|
2012-01-25 20:23:00 +01:00
|
|
|
'</div>';
|
|
|
|
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
|
|
->setContent($content);
|
|
|
|
}
|
|
|
|
}
|