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 03:46:01 +01:00
|
|
|
$content = hsprintf(
|
|
|
|
'<div class="phabricator-remarkup">%s</div>',
|
|
|
|
$output);
|
2012-01-25 20:23:00 +01:00
|
|
|
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
|
|
->setContent($content);
|
|
|
|
}
|
|
|
|
}
|