mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Update to use PHUIRemarkupView everywhere possible
Summary: Moves all the one off object calls to PHUIRemarkupView, adds a "Document" call as well (future plans). Test Plan: Visited most pages I could get access to, but may want extra careful eyes on this diff. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15281
This commit is contained in:
parent
376c85a828
commit
f35509e30e
34 changed files with 81 additions and 197 deletions
|
@ -363,11 +363,7 @@ final class PhabricatorCalendarEventViewController
|
|||
->getIconLabel($event->getIcon()));
|
||||
|
||||
if (strlen($event->getDescription())) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($event->getDescription()),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $event->getDescription());
|
||||
$properties->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
|
|
@ -341,23 +341,14 @@ final class PhabricatorConfigWelcomeController
|
|||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Welcome to Phabricator'));
|
||||
|
||||
$setup_header = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent(pht('=Setup and Configuration')),
|
||||
'default',
|
||||
$viewer);
|
||||
$setup_header = new PHUIRemarkupView(
|
||||
$viewer, pht('=Setup and Configuration'));
|
||||
|
||||
$explore_header = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent(pht('=Explore Phabricator')),
|
||||
'default',
|
||||
$viewer);
|
||||
$explore_header = new PHUIRemarkupView(
|
||||
$viewer, pht('=Explore Phabricator'));
|
||||
|
||||
$quick_header = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent(pht('=Quick Start Guides')),
|
||||
'default',
|
||||
$viewer);
|
||||
$quick_header = new PHUIRemarkupView(
|
||||
$viewer, pht('=Quick Start Guide'));
|
||||
|
||||
return id(new PHUIDocumentView())
|
||||
->setHeader($header)
|
||||
|
@ -376,10 +367,7 @@ final class PhabricatorConfigWelcomeController
|
|||
$icon = id(new PHUIIconView())
|
||||
->setIcon($icon.' fa-2x');
|
||||
|
||||
$content = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($content),
|
||||
'default',
|
||||
$viewer);
|
||||
$content = new PHUIRemarkupView($viewer, $content);
|
||||
|
||||
$icon = phutil_tag(
|
||||
'div',
|
||||
|
|
|
@ -132,11 +132,7 @@ final class PhabricatorCountdownViewController
|
|||
|
||||
$description = $countdown->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($description),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
|
|
@ -44,12 +44,7 @@ final class DifferentialRevertPlanField
|
|||
return null;
|
||||
}
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setPreserveLinebreaks(true)
|
||||
->setContent($this->getValue()),
|
||||
'default',
|
||||
$this->getViewer());
|
||||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function shouldAppearInGlobalSearch() {
|
||||
|
|
|
@ -122,12 +122,7 @@ final class DifferentialSummaryField
|
|||
return null;
|
||||
}
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setPreserveLinebreaks(true)
|
||||
->setContent($this->getValue()),
|
||||
'default',
|
||||
$this->getViewer());
|
||||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
|
|
|
@ -136,12 +136,7 @@ final class DifferentialTestPlanField
|
|||
return null;
|
||||
}
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setPreserveLinebreaks(true)
|
||||
->setContent($this->getValue()),
|
||||
'default',
|
||||
$this->getViewer());
|
||||
return new PHUIRemarkupView($this->getViewer(), $this->getValue());
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
|
|
|
@ -290,10 +290,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
|
||||
$description = $repository->getDetail('description');
|
||||
if (strlen($description)) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
$repository,
|
||||
'description',
|
||||
$user);
|
||||
$description = new PHUIRemarkupView($user, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent($description);
|
||||
|
|
|
@ -309,10 +309,7 @@ final class DiffusionRepositoryEditMainController
|
|||
if (!strlen($description)) {
|
||||
$description = phutil_tag('em', array(), pht('No description provided.'));
|
||||
} else {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
$repository,
|
||||
'description',
|
||||
$viewer);
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
}
|
||||
$view->addTextContent($description);
|
||||
|
||||
|
|
|
@ -94,11 +94,7 @@ final class DivinerBookController extends DivinerController {
|
|||
$preface = $book->getPreface();
|
||||
$preface_view = null;
|
||||
if (strlen($preface)) {
|
||||
$preface_view =
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($preface),
|
||||
'default',
|
||||
$viewer);
|
||||
$preface_view = new PHUIRemarkupView($viewer, $preface);
|
||||
}
|
||||
|
||||
$document->appendChild($preface_view);
|
||||
|
|
|
@ -61,11 +61,7 @@ final class DivinerMainController extends DivinerController {
|
|||
" %s\n\n",
|
||||
'phabricator/ $ ./bin/diviner generate');
|
||||
|
||||
$text = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($text),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$text = new PHUIRemarkupView($viewer, $text);
|
||||
$document->appendChild($text);
|
||||
}
|
||||
|
||||
|
|
|
@ -111,10 +111,7 @@ final class PhabricatorAsanaConfigOptions
|
|||
"The Asana Workspaces your linked account has access to are:\n\n%s",
|
||||
$out);
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($out),
|
||||
'default',
|
||||
$viewer);
|
||||
return new PHUIRemarkupView($viewer, $out);
|
||||
}
|
||||
|
||||
private function renderContextualProjectDescription(
|
||||
|
@ -155,10 +152,7 @@ final class PhabricatorAsanaConfigOptions
|
|||
|
||||
$out = implode("\n", $out);
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($out),
|
||||
'default',
|
||||
$viewer);
|
||||
return new PHUIRemarkupView($viewer, $out);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,11 +98,7 @@ final class FundInitiativeViewController
|
|||
|
||||
$description = $initiative->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($description),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent($description);
|
||||
|
@ -110,11 +106,7 @@ final class FundInitiativeViewController
|
|||
|
||||
$risks = $initiative->getRisks();
|
||||
if (strlen($risks)) {
|
||||
$risks = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($risks),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$risks = new PHUIRemarkupView($viewer, $risks);
|
||||
$view->addSectionHeader(
|
||||
pht('Risks/Challenges'), 'fa-ambulance');
|
||||
$view->addTextContent($risks);
|
||||
|
|
|
@ -181,16 +181,10 @@ final class HarbormasterBuildViewController
|
|||
if ($step) {
|
||||
$description = $step->getDescription();
|
||||
if ($description) {
|
||||
$rendered = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent($description)
|
||||
->setPreserveLinebreaks(true),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$properties->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$properties->addTextContent($rendered);
|
||||
$properties->addTextContent($description);
|
||||
}
|
||||
} else {
|
||||
$target_box->setFormErrors(
|
||||
|
|
|
@ -258,11 +258,7 @@ final class LegalpadDocumentSignController extends LegalpadController {
|
|||
|
||||
$preamble_box = null;
|
||||
if (strlen($document->getPreamble())) {
|
||||
$preamble_text = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent(
|
||||
$document->getPreamble()),
|
||||
'default',
|
||||
$viewer);
|
||||
$preamble_text = new PHUIRemarkupView($viewer, $document->getPreamble());
|
||||
|
||||
// NOTE: We're avoiding `setObject()` here so we don't pick up extra UI
|
||||
// elements like "Subscribers". This information is available on the
|
||||
|
|
|
@ -104,14 +104,11 @@ final class PhabricatorApplicationDetailViewController
|
|||
}
|
||||
|
||||
$overview = $application->getOverview();
|
||||
if ($overview) {
|
||||
if (strlen($overview)) {
|
||||
$overview = new PHUIRemarkupView($viewer, $overview);
|
||||
$properties->addSectionHeader(
|
||||
pht('Overview'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$properties->addTextContent(
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($overview),
|
||||
'default',
|
||||
$viewer));
|
||||
$properties->addTextContent($overview);
|
||||
}
|
||||
|
||||
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
|
||||
|
|
|
@ -117,10 +117,7 @@ final class PhabricatorApplicationEmailCommandsController
|
|||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$content_box = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($content),
|
||||
'default',
|
||||
$viewer);
|
||||
$content_box = new PHUIRemarkupView($viewer, $content);
|
||||
|
||||
$info_view = null;
|
||||
if (!PhabricatorEnv::getEnvConfig('metamta.reply-handler-domain')) {
|
||||
|
|
|
@ -120,11 +120,7 @@ final class NuancePhabricatorFormSourceDefinition
|
|||
PHUIPropertyListView $view) {
|
||||
|
||||
$complaint = $item->getNuanceProperty('complaint');
|
||||
$complaint = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($complaint),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$complaint = new PHUIRemarkupView($viewer, $complaint);
|
||||
$view->addSectionHeader(
|
||||
pht('Complaint'), 'fa-exclamation-circle');
|
||||
$view->addTextContent($complaint);
|
||||
|
|
|
@ -189,13 +189,10 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$description = $package->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent(
|
||||
$output = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($description),
|
||||
'default',
|
||||
$viewer));
|
||||
$view->addTextContent($description);
|
||||
}
|
||||
|
||||
$view->invokeWillRenderEvent();
|
||||
|
|
|
@ -118,10 +118,7 @@ final class PhameBlogManageController extends PhameBlogController {
|
|||
$properties->invokeWillRenderEvent();
|
||||
|
||||
if (strlen($blog->getDescription())) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($blog->getDescription()),
|
||||
'default',
|
||||
$viewer);
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$properties->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
|
|
@ -86,16 +86,13 @@ final class PholioInlineController extends PholioController {
|
|||
),
|
||||
$author_handle->renderLink());
|
||||
|
||||
$inline_content = new PHUIRemarkupView($viewer, $inline->getContent());
|
||||
$comment_body = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'pholio-inline-comment-body',
|
||||
),
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent($inline->getContent()),
|
||||
'default',
|
||||
$viewer));
|
||||
$inline_content);
|
||||
|
||||
return $this->newDialog()
|
||||
->setTitle(pht('Inline Comment'))
|
||||
|
|
|
@ -48,12 +48,7 @@ abstract class PhortuneCartController
|
|||
return null;
|
||||
}
|
||||
|
||||
$output = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setPreserveLinebreaks(true)
|
||||
->setContent($description),
|
||||
'default',
|
||||
$this->getViewer());
|
||||
$output = new PHUIRemarkupView($this->getUser(), $description);
|
||||
|
||||
$box = id(new PHUIBoxView())
|
||||
->addMargin(PHUI::MARGIN_LARGE)
|
||||
|
|
|
@ -136,11 +136,7 @@ final class PhortuneMerchantViewController
|
|||
|
||||
$description = $merchant->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($description),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent($description);
|
||||
|
|
|
@ -134,16 +134,12 @@ final class PhabricatorPhurlURLViewController
|
|||
|
||||
$properties->invokeWillRenderEvent();
|
||||
|
||||
if (strlen($url->getDescription())) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($url->getDescription()),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = $url->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$properties->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
||||
$properties->addTextContent($description);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,13 +122,13 @@ final class PhabricatorSlowvotePollController
|
|||
|
||||
$view->invokeWillRenderEvent();
|
||||
|
||||
if (strlen($poll->getDescription())) {
|
||||
$view->addTextContent(
|
||||
$output = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent(
|
||||
$poll->getDescription()),
|
||||
'default',
|
||||
$viewer));
|
||||
$description = $poll->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addTextContent($description);
|
||||
}
|
||||
|
||||
return $view;
|
||||
|
|
|
@ -74,13 +74,9 @@ final class SlowvoteEmbedView extends AphrontView {
|
|||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($link_to_slowvote);
|
||||
|
||||
$description = null;
|
||||
if ($poll->getDescription()) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent(
|
||||
$poll->getDescription()),
|
||||
'default',
|
||||
$this->getUser());
|
||||
$description = $poll->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($this->getUser(), $description);
|
||||
$description = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
|
|
|
@ -83,15 +83,10 @@ final class PhabricatorSpacesViewController
|
|||
|
||||
$description = $space->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($description),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$list->addSectionHeader(
|
||||
pht('Description'),
|
||||
PHUIPropertyListView::ICON_SUMMARY);
|
||||
|
||||
$list->addTextContent($description);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,10 +50,7 @@ final class PhabricatorApplicationTransactionCommentRawController
|
|||
$details_text = pht(
|
||||
'For full details, run `/bin/mail show-outbound --id %d`',
|
||||
$source_id);
|
||||
$addendum = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($details_text),
|
||||
'default',
|
||||
$viewer);
|
||||
$addendum = new PHUIRemarkupView($viewer, $details_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,11 +121,7 @@ final class PhabricatorTypeaheadFunctionHelpController
|
|||
}
|
||||
|
||||
$content = implode("\n\n", $content);
|
||||
|
||||
$content_box = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($content),
|
||||
'default',
|
||||
$viewer);
|
||||
$content_box = new PHUIRemarkupView($viewer, $content);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title);
|
||||
|
|
|
@ -40,10 +40,7 @@ IMPORTANT: This is not really important.
|
|||
EOCONTENT
|
||||
);
|
||||
|
||||
$remarkup = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($content),
|
||||
'default',
|
||||
$viewer);
|
||||
$remarkup = new PHUIRemarkupView($viewer, $content);
|
||||
|
||||
$frame = id(new PHUIBoxView())
|
||||
->addPadding(PHUI::PADDING_LARGE)
|
||||
|
|
|
@ -39,12 +39,7 @@ final class PhabricatorStandardCustomFieldRemarkup
|
|||
// end of the world.
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setContent($value)
|
||||
->setPReserveLinebreaks(true),
|
||||
'default',
|
||||
$viewer);
|
||||
return new PHUIRemarkupView($viewer, $value);
|
||||
}
|
||||
|
||||
public function getApplicationTransactionTitle(
|
||||
|
|
|
@ -12,22 +12,41 @@
|
|||
final class PHUIRemarkupView extends AphrontView {
|
||||
|
||||
private $corpus;
|
||||
private $markupType;
|
||||
|
||||
const DOCUMENT = 'document';
|
||||
|
||||
public function __construct(PhabricatorUser $viewer, $corpus) {
|
||||
$this->setUser($viewer);
|
||||
$this->corpus = $corpus;
|
||||
}
|
||||
|
||||
private function setMarkupType($type) {
|
||||
$this->markupType($type);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$viewer = $this->getUser();
|
||||
$corpus = $this->corpus;
|
||||
|
||||
return PhabricatorMarkupEngine::renderOneObject(
|
||||
$content = PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())
|
||||
->setPreserveLinebreaks(true)
|
||||
->setContent($corpus),
|
||||
'default',
|
||||
$viewer);
|
||||
|
||||
if ($this->markupType == self::DOCUMENT) {
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-remarkup phui-document-view',
|
||||
),
|
||||
$content);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,10 +85,8 @@ final class AphrontFormView extends AphrontView {
|
|||
|
||||
public function appendRemarkupInstructions($remarkup) {
|
||||
return $this->appendInstructions(
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($remarkup),
|
||||
'default',
|
||||
$this->getUser()));
|
||||
new PHUIRemarkupView($this->getUser(), $remarkup));
|
||||
|
||||
}
|
||||
|
||||
public function buildLayoutView() {
|
||||
|
|
|
@ -35,11 +35,10 @@ final class PHUIFormLayoutView extends AphrontView {
|
|||
throw new PhutilInvalidStateException('setUser');
|
||||
}
|
||||
|
||||
return $this->appendInstructions(
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($remarkup),
|
||||
'default',
|
||||
$this->getUser()));
|
||||
$viewer = $this->getUser();
|
||||
$instructions = new PHUIRemarkupView($viewer, $remarkup);
|
||||
|
||||
return $this->appendInstructions($instructions);
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
|
|
@ -74,11 +74,8 @@ class PHUIFormPageView extends AphrontView {
|
|||
}
|
||||
|
||||
public function addRemarkupInstructions($remarkup, $before = null) {
|
||||
return $this->addInstructions(
|
||||
PhabricatorMarkupEngine::renderOneObject(
|
||||
id(new PhabricatorMarkupOneOff())->setContent($remarkup),
|
||||
'default',
|
||||
$this->getUser()), $before);
|
||||
$remarkup = new PHUIRemarkupView($this->getUser(), $remarkup);
|
||||
return $this->addInstructions($remarkup, $before);
|
||||
}
|
||||
|
||||
public function addControl(AphrontFormControl $control) {
|
||||
|
|
Loading…
Reference in a new issue