Page MenuHomePhabricator

D8324.diff
No OneTemporary

D8324.diff

Index: src/applications/maniphest/controller/ManiphestTaskEditController.php
===================================================================
--- src/applications/maniphest/controller/ManiphestTaskEditController.php
+++ src/applications/maniphest/controller/ManiphestTaskEditController.php
@@ -460,14 +460,10 @@
$project_tokenizer_id = celerity_generate_unique_node_id();
- if ($request->isAjax()) {
- $form = new PHUIFormLayoutView();
- } else {
- $form = new AphrontFormView();
- $form
- ->setUser($user)
- ->addHiddenInput('template', $template_id);
- }
+ $form = new AphrontFormView();
+ $form
+ ->setUser($user)
+ ->addHiddenInput('template', $template_id);
if ($parent_task) {
$form
@@ -627,7 +623,7 @@
->appendChild(
array(
$error_view,
- $form,
+ $form->buildLayoutView(),
))
->addCancelButton($cancel_uri)
->addSubmitButton($button_name);
Index: src/view/form/AphrontFormView.php
===================================================================
--- src/view/form/AphrontFormView.php
+++ src/view/form/AphrontFormView.php
@@ -81,12 +81,16 @@
$this->getUser()));
}
- public function render() {
-
- require_celerity_resource('phui-form-view-css');
- $layout = id (new PHUIFormLayoutView())
+ public function buildLayoutView() {
+ return id(new PHUIFormLayoutView())
->appendChild($this->renderDataInputs())
->appendChild($this->renderChildren());
+ }
+
+ public function render() {
+ require_celerity_resource('phui-form-view-css');
+
+ $layout = $this->buildLayoutView();
if (!$this->user) {
throw new Exception(pht('You must pass the user to AphrontFormView.'));

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 10:52 AM (14 h, 15 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6913689
Default Alt Text
D8324.diff (1 KB)

Event Timeline