Skip to content
Snippets Groups Projects
Commit d34dbf05 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

worked on CRM-12964, more schema changes / data fixes

parent c481c79f
Branches
Tags
No related merge requests found
......@@ -57,8 +57,8 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
$this->add('text', 'title', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'), true);
$labelStyle = CRM_Core_PseudoConstant::get('CRM_Core_DAO_PrintLabel', 'label_format_id');
$this->add('select', 'label_format_id', ts('Label Style'), array('' => ts('- select -')) + $labelStyle, TRUE);
$labelStyle = CRM_Core_BAO_LabelFormat::getList(TRUE, 'name_badge');
$this->add('select', 'label_format_name', ts('Label Style'), array('' => ts('- select -')) + $labelStyle, TRUE);
$this->add('text', 'description', ts('Description'),
CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'description'));
......
This diff is collapsed.
......@@ -38,9 +38,9 @@
<td class="label">{$form.title.label}</td>
<td>{$form.title.html}</td>
</tr>
<tr class="crm-badge-layout-form-block-label_format_id">
<td class="label">{$form.label_format_id.label}</td>
<td>{$form.label_format_id.html}</td>
<tr class="crm-badge-layout-form-block-label_format_name">
<td class="label">{$form.label_format_name.label}</td>
<td>{$form.label_format_name.html}</td>
</tr>
<tr class="crm-badge-layout-form-block-description">
<td class="label">{$form.description.label}</td>
......
......@@ -39,12 +39,13 @@
<add>4.4</add>
</field>
<field>
<name>label_format_id</name>
<type>int unsigned</type>
<name>label_format_name</name>
<type>varchar</type>
<length>255</length>
<pseudoconstant>
<optionGroupName>name_badge</optionGroupName>
</pseudoconstant>
<comment>Implicit FK to civicrm_option_value row in name_badge option group</comment>
<comment>This refers to name column of civicrm_option_value row in name_badge option group</comment>
<add>4.4</add>
</field>
<field>
......@@ -62,12 +63,6 @@
<comment>contains json encode configurations options</comment>
<add>4.4</add>
</field>
<field>
<name>html</name>
<type>longtext</type>
<comment>Label contents in HTML format with tokens and image file references</comment>
<add>4.4</add>
</field>
<field>
<name>is_default</name>
<type>boolean</type>
......
......@@ -875,7 +875,7 @@ VALUES
(@option_group_id_label_type, '{ts escape="sql"}Event Badge{/ts}', 1, 'Event Badge', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
-- Name Label format
(@option_group_id_name_badge, '{ts escape="sql"}Avery 5395{/ts}', '{literal}{"name":"Avery 5395","paper-size":"a4","metric":"mm","lMargin":13.5,"tMargin":3,"NX":2,"NY":4,"SpaceX":15,"SpaceY":8.5,"width":85.7,"height":59.2,"font-size":12,"orientation":"portrait","font-name":"helvetica","font-style":"","lPadding":0,"tPadding":0}{/literal}', 'Avery 5395', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
(@option_group_id_name_badge, '{ts escape="sql"}Avery 5395{/ts}', '{literal}{"name":"Avery 5395","paper-size":"a4","metric":"mm","lMargin":13.5,"tMargin":3,"NX":2,"NY":4,"SpaceX":15,"SpaceY":8.5,"width":85.7,"height":59.2,"font-size":12,"orientation":"portrait","font-name":"helvetica","font-style":"","lPadding":0,"tPadding":0}{/literal}', 'Avery_5395', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL),
-- Mailing Label Formats
(@option_group_id_label, '{ts escape="sql"}Avery 3475{/ts}', '{literal}{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":10,"font-style":"","metric":"mm","lMargin":0,"tMargin":5,"NX":3,"NY":8,"SpaceX":0,"SpaceY":0,"width":70,"height":36,"lPadding":5.08,"tPadding":5.08}{/literal}', '3475', 'Avery', NULL, 0, 1, NULL, 0, 1, 1, NULL, NULL),
......
......@@ -252,7 +252,7 @@ VALUES
(@priceFieldID,'tenor','Tenor','40',2,1,0,2),
(@priceFieldID,'soprano','Soprano','50',3,1,0,2);
INSERT INTO civicrm_print_label (title, name, description, label_format_id, label_type_id, is_default, is_reserved, is_active)
INSERT INTO civicrm_print_label (title, name, description, label_format_name, label_type_id, is_default, is_reserved, is_active)
VALUES
('Annual Conference Hanging Badge (Avery 5395)', 'Annual_Conference_Hanging_Badge', 'For our annual conference', 1, 1, 1, 1, 1 );
('Annual Conference Hanging Badge (Avery 5395)', 'Annual_Conference_Hanging_Badge', 'For our annual conference', 'Avery_5395', 1, 1, 1, 1 );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment