From 3fdaf229a70ffdd343dc264ad5f483544da2cf56 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 14 Feb 2016 12:29:28 -0800 Subject: [PATCH] Convert Create/Edit Column pages to dialogs Summary: Makes these pages a dialog endpoint, keeping you on the Workboard when possible. Test Plan: Create a Column, Edit a Column, visit hard page. Test letters in the points field. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15270 --- .../PhabricatorProjectBoardViewController.php | 2 +- ...PhabricatorProjectColumnEditController.php | 22 ++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index 0685391cbb..e8de61e3cc 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -692,7 +692,7 @@ final class PhabricatorProjectBoardViewController ->setName(pht('Add Column')) ->setHref($add_uri) ->setDisabled(!$can_edit) - ->setWorkflow(!$can_edit); + ->setWorkflow(true); $manage_items[] = id(new PhabricatorActionView()) ->setIcon('fa-exchange') diff --git a/src/applications/project/controller/PhabricatorProjectColumnEditController.php b/src/applications/project/controller/PhabricatorProjectColumnEditController.php index 5ebc721c69..9f880b9515 100644 --- a/src/applications/project/controller/PhabricatorProjectColumnEditController.php +++ b/src/applications/project/controller/PhabricatorProjectColumnEditController.php @@ -136,21 +136,13 @@ final class PhabricatorProjectColumnEditController $submit = pht('Save Column'); } - $form->appendChild( - id(new AphrontFormSubmitControl()) - ->setValue($submit) - ->addCancelButton($view_uri)); - - $form_box = id(new PHUIObjectBoxView()) - ->setHeaderText($title) - ->setValidationException($validation_exception) - ->setForm($form); - - $nav = $this->getProfileMenu(); - - return $this->newPage() + return $this->newDialog() + ->setWidth(AphrontDialogView::WIDTH_FORM) ->setTitle($title) - ->setNavigation($nav) - ->appendChild($form_box); + ->appendForm($form) + ->setValidationException($validation_exception) + ->addCancelButton($view_uri) + ->addSubmitButton($submit); + } }