From a2fdee87f2f972ddb90d4a32c7ef613fca72854c Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 23 May 2018 16:27:13 +1200 Subject: [PATCH] Make label field on relationship type required again (accidentally removed --- CRM/Admin/Form/RelationshipType.php | 4 +++- CRM/Member/Form/MembershipStatus.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Admin/Form/RelationshipType.php b/CRM/Admin/Form/RelationshipType.php index ed13ef49a3..387905615c 100644 --- a/CRM/Admin/Form/RelationshipType.php +++ b/CRM/Admin/Form/RelationshipType.php @@ -49,6 +49,7 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { * or is not a core field on the form's entity). * - help (option) add help to the field - e.g ['id' => 'id-source', 'file' => 'CRM/Contact/Form/Contact']] * - template - use a field specific template to render this field + * - required * @var array */ protected $entityFields = []; @@ -60,7 +61,8 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { $this->entityFields = [ 'label_a_b' => [ 'name' => 'label_a_b', - 'description' => ts("Label for the relationship from Contact A to Contact B. EXAMPLE: Contact A is 'Parent of' Contact B.") + 'description' => ts("Label for the relationship from Contact A to Contact B. EXAMPLE: Contact A is 'Parent of' Contact B."), + 'required' => TRUE, ], 'label_b_a' => [ 'name' => 'label_b_a', diff --git a/CRM/Member/Form/MembershipStatus.php b/CRM/Member/Form/MembershipStatus.php index 5a47ed7e97..10b468febd 100644 --- a/CRM/Member/Form/MembershipStatus.php +++ b/CRM/Member/Form/MembershipStatus.php @@ -63,6 +63,7 @@ class CRM_Member_Form_MembershipStatus extends CRM_Core_Form { * or is not a core field on the form's entity). * - help (optional) add help to the field - e.g ['id' => 'id-source', 'file' => 'CRM/Contact/Form/Contact']] * - template - use a field specific template to render this field + * - required * @var array */ protected $entityFields = []; @@ -90,7 +91,7 @@ class CRM_Member_Form_MembershipStatus extends CRM_Core_Form { * We do this from the constructor in order to do a translation. */ public function setDeleteMessage() { - $this->deleteMessage = ts('WARNING: Deleting this option will result in the loss of all membership records of this status.') . ' ' . ts('This may mean the loss of a substantial amount of data, and the action cannot be undone.') . ' ' . ts('Do you want to continue?'); + $this->deleteMessage = ts('You will not be able to delete this membership status if there are existing memberships with this status. You will need to check all your membership status rules afterwards to ensure that a valid status will always be available.') . " " . ts('Do you want to continue?'); } public function preProcess() { -- 2.25.1