From 14dfff9c99d23c118b573b58dbaef4dad59ebab5 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 19 Jan 2017 13:23:42 -0800 Subject: [PATCH] Mark fields as required on MenuItems Summary: Mark required fields as required. Though in testing, none of these work. Test Plan: Try to save a form without an app/project/dashboard and see success (not expected) Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17231 --- .../search/menuitem/PhabricatorApplicationProfileMenuItem.php | 1 + .../search/menuitem/PhabricatorDashboardProfileMenuItem.php | 1 + .../search/menuitem/PhabricatorEditEngineProfileMenuItem.php | 1 + .../search/menuitem/PhabricatorProjectProfileMenuItem.php | 1 + 4 files changed, 4 insertions(+) diff --git a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php index 214819100e..a207f57f3a 100644 --- a/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php @@ -34,6 +34,7 @@ final class PhabricatorApplicationProfileMenuItem id(new PhabricatorDatasourceEditField()) ->setKey('application') ->setLabel(pht('Application')) + ->setIsRequired(true) ->setDatasource(new PhabricatorApplicationDatasource()) ->setSingleValue($config->getMenuItemProperty('application')), ); diff --git a/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php index 9074b1b117..9b9d1dff7c 100644 --- a/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php @@ -77,6 +77,7 @@ final class PhabricatorDashboardProfileMenuItem id(new PhabricatorDatasourceEditField()) ->setKey('dashboardPHID') ->setLabel(pht('Dashboard')) + ->setIsRequired(true) ->setDatasource(new PhabricatorDashboardDatasource()) ->setSingleValue($config->getMenuItemProperty('dashboardPHID')), ); diff --git a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php index 374fe10366..071efa80dd 100644 --- a/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorEditEngineProfileMenuItem.php @@ -85,6 +85,7 @@ final class PhabricatorEditEngineProfileMenuItem id(new PhabricatorDatasourceEditField()) ->setKey('formKey') ->setLabel(pht('Form')) + ->setIsRequired(true) ->setDatasource(new PhabricatorEditEngineDatasource()) ->setSingleValue($config->getMenuItemProperty('formKey')), ); diff --git a/src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php index 002a3fcace..e47d97677f 100644 --- a/src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorProjectProfileMenuItem.php @@ -78,6 +78,7 @@ final class PhabricatorProjectProfileMenuItem id(new PhabricatorDatasourceEditField()) ->setKey('project') ->setLabel(pht('Project')) + ->setIsRequired(true) ->setDatasource(new PhabricatorProjectDatasource()) ->setSingleValue($config->getMenuItemProperty('project')), );