From 20fcffce38491edeb339d05ab8de4c805ebb3a0f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 1 Dec 2021 10:27:26 +1300 Subject: [PATCH] Remove isset from add new group form civicrm/group/add?reset=1 --- CRM/Group/Form/Edit.php | 2 ++ templates/CRM/Group/Form/GroupsCommon.tpl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index 0afebfb810..6f76bdecb2 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -92,6 +92,8 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { * Set up variables to build the form. */ public function preProcess() { + $this->addOptionalQuickFormElement('parents'); + $this->addExpectedSmartyVariable('parent_groups'); $this->_id = $this->get('id'); if ($this->_id) { $breadCrumb = array( diff --git a/templates/CRM/Group/Form/GroupsCommon.tpl b/templates/CRM/Group/Form/GroupsCommon.tpl index 2be8d82ccd..0a78e42db5 100644 --- a/templates/CRM/Group/Form/GroupsCommon.tpl +++ b/templates/CRM/Group/Form/GroupsCommon.tpl @@ -8,9 +8,9 @@ +--------------------------------------------------------------------+ *} {*CRM-14190*} -{if (isset($parent_groups) and $parent_groups|@count > 0) or !empty($form.parents.html)} +{if $parent_groups|@count > 0 || !empty($form.parents.html)}

{ts}Parent Groups{/ts} {help id="id-group-parent" file="CRM/Group/Page/Group.hlp"}

- {if isset($parent_groups) and $parent_groups|@count > 0} + {if $parent_groups|@count > 0} -- 2.25.1