From f5cf8c8d59dd8cec0e29ece2de6bbb962767180b Mon Sep 17 00:00:00 2001 From: kurund Date: Wed, 18 Sep 2013 12:11:25 +0530 Subject: [PATCH] CRM-13327, do not expose name badge, option ---------------------------------------- * CRM-13327: Add support for 3 additional event badge formats AND remove Name Badge labels from Label Formats admin http://issues.civicrm.org/jira/browse/CRM-13327 --- CRM/Admin/Form/LabelFormats.php | 7 +++++++ templates/CRM/Admin/Form/LabelFormats.tpl | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CRM/Admin/Form/LabelFormats.php b/CRM/Admin/Form/LabelFormats.php index 13522b8b94..f0910623aa 100644 --- a/CRM/Admin/Form/LabelFormats.php +++ b/CRM/Admin/Form/LabelFormats.php @@ -88,6 +88,8 @@ class CRM_Admin_Form_LabelFormats extends CRM_Admin_Form { $this->add('text', 'description', ts('Description'), array('size' => CRM_Utils_Type::HUGE)); $this->add('checkbox', 'is_default', ts('Is this Label Format the default?')); + // currently we support only mailing label creation, hence comment below code + /* $options = array( 'label_format' => ts('Mailing Label'), 'name_badge' => ts('Name Badge'), @@ -98,6 +100,7 @@ class CRM_Admin_Form_LabelFormats extends CRM_Admin_Form { if ($this->_action != CRM_Core_Action::ADD) { $labelType->freeze(); } + */ $this->add('select', 'paper_size', ts('Sheet Size'), array( @@ -208,6 +211,10 @@ class CRM_Admin_Form_LabelFormats extends CRM_Admin_Form { } $values = $this->controller->exportValues($this->getName()); + + // since we currently support only mailing label format + $values['label_type'] = 'label_format'; + $values['is_default'] = isset($values['is_default']); // Restore field names that were converted because they are illegal PHP/SMARTY variable names diff --git a/templates/CRM/Admin/Form/LabelFormats.tpl b/templates/CRM/Admin/Form/LabelFormats.tpl index df8226157f..0aa63e5b0c 100644 --- a/templates/CRM/Admin/Form/LabelFormats.tpl +++ b/templates/CRM/Admin/Form/LabelFormats.tpl @@ -53,10 +53,10 @@   {$form.is_default.html} {$form.is_default.label} - + {$form.paper_size.label} {$form.paper_size.html} -- 2.25.1