mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-02 02:40:58 +01:00
Add a cancel button to Phriction's edit interface
Summary: So you don't have to edit if you don't want to. Test Plan: Hit "cancel" on an edit of an existing page and an edit of a new page. Reviewed By: codeblock Reviewers: hsb, codeblock, jungejason, tuomaspelkonen, aran CC: aran, codeblock Differential Revision: 675
This commit is contained in:
parent
b1c42f4893
commit
ffb69c3c97
1 changed files with 3 additions and 0 deletions
|
@ -150,6 +150,8 @@ class PhrictionEditController
|
||||||
),
|
),
|
||||||
'Formatting Reference');
|
'Formatting Reference');
|
||||||
|
|
||||||
|
$cancel_uri = PhrictionDocument::getSlugURI($document->getSlug());
|
||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setAction($request->getRequestURI()->getPath())
|
->setAction($request->getRequestURI()->getPath())
|
||||||
|
@ -173,6 +175,7 @@ class PhrictionEditController
|
||||||
->setCaption($remarkup_reference))
|
->setCaption($remarkup_reference))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
|
->addCancelButton($cancel_uri)
|
||||||
->setValue($submit_button));
|
->setValue($submit_button));
|
||||||
|
|
||||||
$panel = id(new AphrontPanelView())
|
$panel = id(new AphrontPanelView())
|
||||||
|
|
Loading…
Reference in a new issue