From aeb4267b95f758f06a954e1b9fc21e8cd73c21b1 Mon Sep 17 00:00:00 2001 From: lkassianik Date: Wed, 10 Dec 2014 15:32:54 -0800 Subject: [PATCH] Don't show "Primary Hashtag" when creating a project Summary: Fixes T6598, "Primary Hashtag" field should only be visible in edit mode of existing projects. Test Plan: Create project, "Primary Hashtag" field should be hidden. Edit an existing project, "Primary Hashtag" field should appear above "Additional Hashtags" as before. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T6598 Differential Revision: https://secure.phabricator.com/D10964 --- .../PhabricatorProjectEditDetailsController.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectEditDetailsController.php b/src/applications/project/controller/PhabricatorProjectEditDetailsController.php index a496f25e3c..aa31421471 100644 --- a/src/applications/project/controller/PhabricatorProjectEditDetailsController.php +++ b/src/applications/project/controller/PhabricatorProjectEditDetailsController.php @@ -220,12 +220,17 @@ final class PhabricatorProjectEditDetailsController ->setLabel(pht('Color')) ->setName('color') ->setValue($v_color) - ->setOptions($shades)) - ->appendChild( + ->setOptions($shades)); + + if (!$is_new) { + $form->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Primary Hashtag')) ->setCaption(pht('The primary hashtag is derived from the name.')) - ->setValue($v_primary_slug)) + ->setValue($v_primary_slug)); + } + + $form ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Additional Hashtags'))