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-11-11 18:23:23 +01:00
|
|
|
$content = phutil_tag_div('phabricator-remarkup', $output);
|
2012-01-25 20:23:00 +01:00
|
|
|
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
|
|
->setContent($content);
|
|
|
|
}
|
|
|
|
}
|