From d9aa50a7770da20275c353726fc0d9072de1fea6 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Thu, 27 Jun 2013 15:58:00 +0530 Subject: [PATCH] CRM-12942 : added closure for function definition and its usage, as to remove its global definition as mentioned in comment for PR#1059 --- CRM/Custom/Form/Group.php | 8 +- templates/CRM/Custom/Form/Group.tpl | 155 +++++++++++++++------------- 2 files changed, 85 insertions(+), 78 deletions(-) diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index 912e64da33..5e75eee8c2 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -352,12 +352,8 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { $this->addElement('checkbox', 'is_active', ts('Is this Custom Data Set active?')); // does this set have multiple record? - $multiple = $this->addElement('checkbox', - 'is_multiple', - ts('Does this Custom Field Set allow multiple records?'), - NULL, - array('onclick' => "showRange();") - ); + $multiple = $this->addElement('checkbox', 'is_multiple', + ts('Does this Custom Field Set allow multiple records?'), NULL); // $min_multiple = $this->add('text', 'min_multiple', ts('Minimum number of multiple records'), $attributes['min_multiple'] ); // $this->addRule('min_multiple', ts('is a numeric field') , 'numeric'); diff --git a/templates/CRM/Custom/Form/Group.tpl b/templates/CRM/Custom/Form/Group.tpl index 7ef18246df..334812a259 100644 --- a/templates/CRM/Custom/Form/Group.tpl +++ b/templates/CRM/Custom/Form/Group.tpl @@ -85,94 +85,105 @@ {$initHideBlocks} {literal} {/literal} -- 2.25.1