From f37c6bf15d565d21158ca4fd5dc866eff07e18b8 Mon Sep 17 00:00:00 2001 From: TeNNoX Date: Mon, 22 Sep 2014 17:51:16 +0100 Subject: [PATCH] Display the 'is_selectable' checkbox as it should. --- CRM/Admin/Form/Tag.php | 7 +++++-- templates/CRM/Admin/Form/Tag.tpl | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CRM/Admin/Form/Tag.php b/CRM/Admin/Form/Tag.php index ccf752700c..011d926f1d 100644 --- a/CRM/Admin/Form/Tag.php +++ b/CRM/Admin/Form/Tag.php @@ -91,8 +91,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form { CRM_Core_DAO::getAttribute('CRM_Core_DAO_Tag', 'description') ); - //@lobo haven't a clue why the checkbox isn't displayed (it should be checked by default - $this->add('checkbox', 'is_selectable'); + $this->add('checkbox', 'is_selectable', ts('Selectable?')); $isReserved = $this->add('checkbox', 'is_reserved', ts('Reserved?')); @@ -150,6 +149,10 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form { $params['is_reserved'] = 0; } + if (!isset($params['is_selectable'])) { + $params['is_selectable'] = 0; + } + if ($this->_action == CRM_Core_Action::DELETE) { if ($this->_id > 0) { $tag = civicrm_api3('tag', 'getsingle', array('id' => $this->_id)); diff --git a/templates/CRM/Admin/Form/Tag.tpl b/templates/CRM/Admin/Form/Tag.tpl index 242138abea..cbea49a7eb 100644 --- a/templates/CRM/Admin/Form/Tag.tpl +++ b/templates/CRM/Admin/Form/Tag.tpl @@ -57,6 +57,11 @@ {$form.is_reserved.html}
{ts}Reserved tags can not be deleted. Users with 'administer reserved tags' permission can set or unset the reserved flag. You must uncheck 'Reserved' (and delete any child tags) before you can delete a tag.{/ts} + + {$form.is_selectable.label} + {$form.is_selectable.html}
{ts}Defines if you can select this tag.{/ts} + + {if $parent_tags|@count > 0} -- 2.25.1