From 4e7e204ae9c42d0420f7975c40ffff345750a0e3 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 3 Apr 2016 11:49:33 -0700 Subject: [PATCH] Update Fund edit page for new UI Summary: Updates fund for new edit UI Test Plan: Create Fund, Edit Fund Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15595 --- .../FundInitiativeEditController.php | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/applications/fund/controller/FundInitiativeEditController.php b/src/applications/fund/controller/FundInitiativeEditController.php index 75f7d338c9..354d686bd5 100644 --- a/src/applications/fund/controller/FundInitiativeEditController.php +++ b/src/applications/fund/controller/FundInitiativeEditController.php @@ -30,13 +30,14 @@ final class FundInitiativeEditController $title = pht('Create Initiative'); $button_text = pht('Create Initiative'); $cancel_uri = $this->getApplicationURI(); + $header_icon = 'fa-plus-square'; } else { $title = pht( - 'Edit %s %s', - $initiative->getMonogram(), + 'Edit Initiative: %s', $initiative->getName()); $button_text = pht('Save Changes'); $cancel_uri = '/'.$initiative->getMonogram(); + $header_icon = 'fa-pencil'; } $e_name = true; @@ -230,20 +231,26 @@ final class FundInitiativeEditController '/'.$initiative->getMonogram()); $crumbs->addTextCrumb(pht('Edit')); } + $crumbs->setBorder(true); $box = id(new PHUIObjectBoxView()) ->setValidationException($validation_exception) - ->setHeaderText($title) + ->setHeaderText(pht('Initiative')) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->appendChild($form); - return $this->buildApplicationPage( - array( - $crumbs, - $box, - ), - array( - 'title' => $title, - )); + $header = id(new PHUIHeaderView()) + ->setHeader($title) + ->setHeaderIcon($header_icon); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter($box); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); } }