CRM-13327, do not expose name badge, option
authorkurund <kurund@civicrm.org>
Wed, 18 Sep 2013 06:41:25 +0000 (12:11 +0530)
committerkurund <kurund@civicrm.org>
Wed, 18 Sep 2013 06:41:25 +0000 (12:11 +0530)
----------------------------------------
* 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
templates/CRM/Admin/Form/LabelFormats.tpl

index 13522b8b94bf2dfae713c0210c8c442dca86bfc9..f0910623aa45cd7e3f4375b180d21a64e5c2f38e 100644 (file)
@@ -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
index df8226157f28ae771b9eb65ec385feca551b7ea3..0aa63e5b0c6f11a8f7e0459a7c3ec0bd6262eea2 100644 (file)
         <td>&nbsp;</td>
         <td colspan="3">{$form.is_default.html}&nbsp;{$form.is_default.label}</td>
       </tr>
-      <tr class="crm-labelFormat-form-block-label_type">
+      <!--tr class="crm-labelFormat-form-block-label_type">
         <td class="right">{$form.label_type.label}</td>
         <td colspan="3">{$form.label_type.html}</td>
-      </tr>
+      </tr-->
       <tr>
         <td class="right">{$form.paper_size.label}</td>
         <td>{$form.paper_size.html}</td>