From 00c6e60c27fab510fee2a6387abfc64b9f8ba4dc Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 5 Dec 2013 08:44:43 -0800 Subject: [PATCH] Clean up logged out prompt on TransactionComments Summary: We were getting a weird double box here, missed it my first pass Test Plan: Review logged in Maniphest and Paste, as well as logged out versions. Test Login flow. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7716 --- .../controller/ManiphestTaskDetailController.php | 12 ++++++------ .../PhabricatorApplicationTransactionCommentView.php | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 1fbb4e8088..b86d90ce42 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -382,10 +382,15 @@ final class ManiphestTaskDetailController extends ManiphestController { if (!$user->isLoggedIn()) { // TODO: Eventually, everything should run through this. For now, we're // only using it to get a consistent "Login to Comment" button. - $comment_form = id(new PhabricatorApplicationTransactionCommentView()) + $comment_box = id(new PhabricatorApplicationTransactionCommentView()) ->setUser($user) ->setRequestURI($request->getRequestURI()); $preview_panel = null; + } else { + $comment_box = id(new PHUIObjectBoxView()) + ->setFlush(true) + ->setHeaderText($comment_header) + ->appendChild($comment_form); } $object_box = id(new PHUIObjectBoxView()) @@ -396,11 +401,6 @@ final class ManiphestTaskDetailController extends ManiphestController { $object_box->addPropertyList($description); } - $comment_box = id(new PHUIObjectBoxView()) - ->setFlush(true) - ->setHeaderText($comment_header) - ->appendChild($comment_form); - return $this->buildApplicationPage( array( $crumbs, diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index 0b3e8353b9..463347d215 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php @@ -85,6 +85,7 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView { $uri = id(new PhutilURI('/login/')) ->setQueryParam('next', (string) $this->getRequestURI()); return id(new PHUIObjectBoxView()) + ->setFlush(true) ->setHeaderText(pht('Add Comment')) ->appendChild( javelin_tag(