First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
38
sites/all/modules/civicrm/templates/CRM/Badge/Form/Layout.js
Normal file
38
sites/all/modules/civicrm/templates/CRM/Badge/Form/Layout.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
// http://civicrm.org/licensing
|
||||
CRM.$(function($) {
|
||||
function openKCFinder(field) {
|
||||
var field = $(this);
|
||||
window.KCFinder = {
|
||||
callBack: function(url) {
|
||||
field.val(url).change();
|
||||
// calculate the image default width, height
|
||||
// and assign to respective fields
|
||||
var ajaxUrl = CRM.url('civicrm/ajax/rest', 'className=CRM_Badge_Page_AJAX&fnName=getImageProp&json=1&img=' + url);
|
||||
$.getJSON(ajaxUrl).done(function ( response ) {
|
||||
var widthId = 'width_' + field.attr('id');
|
||||
var heightId = 'height_' + field.attr('id');
|
||||
$('#' + widthId).val(response.width.toFixed(0));
|
||||
$('#' + heightId).val(response.height.toFixed(0));
|
||||
});
|
||||
window.KCFinder = null;
|
||||
}
|
||||
};
|
||||
|
||||
window.open(CRM.kcfinderPath + 'kcfinder/browse.php?cms=civicrm&type=images', 'kcfinder_textbox',
|
||||
'status=0, toolbar=0, location=0, menubar=0, directories=0, ' +
|
||||
'resizable=1, scrollbars=0, width=800, height=600'
|
||||
);
|
||||
}
|
||||
|
||||
$('input[id^="image_"]')
|
||||
.click(openKCFinder)
|
||||
.change(function() {
|
||||
$(this).siblings('.clear-image').css({visibility: $(this).val() ? '' : 'hidden'});
|
||||
})
|
||||
.change();
|
||||
|
||||
$('.clear-image').click(function() {
|
||||
$(this).closest('tr').find('input[type=text]').val('').change();
|
||||
return false;
|
||||
});
|
||||
});
|
158
sites/all/modules/civicrm/templates/CRM/Badge/Form/Layout.tpl
Normal file
158
sites/all/modules/civicrm/templates/CRM/Badge/Form/Layout.tpl
Normal file
|
@ -0,0 +1,158 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing badge layouts *}
|
||||
<h3>{if $action eq 1}{ts}New Badge Layout{/ts}{elseif $action eq 2}{ts}Edit Badge Layout{/ts}{else}{ts}Delete Badge Layout{/ts}{/if}</h3>
|
||||
<div class="crm-block crm-form-block crm-badge-layout-form-block">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
{if $action eq 8}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}This may mean the loss of a substantial amount of data, and the action cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-badge-layout-form-block-title">
|
||||
<td class="label">{$form.title.label}</td>
|
||||
<td>{$form.title.html}</td>
|
||||
</tr>
|
||||
<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} {help id="id-label_format"}</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td>{$form.description.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-image_1">
|
||||
<td class="label">{$form.image_1.label}</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$form.image_1.html}
|
||||
<a href="#" class="crm-hover-button clear-image" title="{ts}Clear{/ts}"><i class="crm-i fa-times"></i></a>
|
||||
<br/>
|
||||
<span class="description">{ts}Click above and select a file by double clicking on it.{/ts}</span>
|
||||
</td>
|
||||
<td>
|
||||
{$form.width_image_1.html}<br/>{$form.width_image_1.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.height_image_1.html}</br>{$form.height_image_1.label}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-image_2">
|
||||
<td class="label">{$form.image_2.label}</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$form.image_2.html}
|
||||
<a href="#" class="crm-hover-button clear-image" title="{ts}Clear{/ts}"><i class="crm-i fa-times"></i></a>
|
||||
<br/>
|
||||
<span class="description">{ts}Click above and select a file by double clicking on it.{/ts}</span>
|
||||
</td>
|
||||
<td>
|
||||
{$form.width_image_2.html}<br/>{$form.width_image_2.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.height_image_2.html}<br/>{$form.height_image_2.label}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-participant_image">
|
||||
<td class="label">{$form.show_participant_image.label}</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$form.show_participant_image.html}
|
||||
<br/>
|
||||
<span class="description">{ts}Select this option if you want to use a contact's image on their name badge.{/ts}</span>
|
||||
</td>
|
||||
<td>
|
||||
{$form.width_participant_image.html}<br/>{$form.width_participant_image.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.height_participant_image.html}</br>{$form.height_participant_image.label}
|
||||
</td>
|
||||
<td>
|
||||
{$form.alignment_participant_image.html}</br>{$form.alignment_participant_image.label}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-elements">
|
||||
<td class="label">{ts}Elements{/ts}</td>
|
||||
<td>
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td>{ts}Row{/ts}</td>
|
||||
<td>{ts}Label{/ts}</td>
|
||||
<td>{ts}Font{/ts}</td>
|
||||
<td>{ts}Size{/ts}</td>
|
||||
<td>{ts}Style{/ts}</td>
|
||||
<td>{ts}Alignment{/ts}</td>
|
||||
</tr>
|
||||
{section name='i' start=1 loop=$rowCount}
|
||||
{assign var='rowNumber' value=$smarty.section.i.index}
|
||||
<tr>
|
||||
<td>#{$rowNumber}</td>
|
||||
<td>{$form.token.$rowNumber.html|crmAddClass:twenty}</td>
|
||||
<td>{$form.font_name.$rowNumber.html}</td>
|
||||
<td>{$form.font_size.$rowNumber.html}</td>
|
||||
<td>{$form.font_style.$rowNumber.html}</td>
|
||||
<td>{$form.text_alignment.$rowNumber.html}</td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-add_barcode">
|
||||
<td class="label">{$form.add_barcode.label}</td>
|
||||
<td>{$form.add_barcode.html} {ts}of type{/ts}
|
||||
{$form.barcode_type.html} {ts}on{/ts} {$form.barcode_alignment.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-is_active">
|
||||
<td class="label">{$form.is_active.label}</td>
|
||||
<td>{$form.is_active.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-is_default">
|
||||
<td class="label">{$form.is_default.label}</td>
|
||||
<td>{$form.is_default.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-badge-layout-form-block-is_reserved">
|
||||
<td class="label">{$form.is_reserved.label}</td>
|
||||
<td>{$form.is_reserved.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id="id-label_format-text"}
|
||||
{ts}Label Formats{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-label_format"}
|
||||
{capture assign=labelURL}{crmURL p='civicrm/admin/labelFormats' q='reset=1&action=browse'}{/capture}
|
||||
<p>
|
||||
{ts 1=$labelURL}Select a pre-defined name badge label format from the list. Label formats control paper size and page configuration (e.g. 2 labels per row, 4 per column). New label formats may require additional programming to produce expected results for event badges.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,81 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="help">
|
||||
{ts}Badge Layout screen for creating custom labels{/ts}
|
||||
</div>
|
||||
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Badge/Form/Layout.tpl"}
|
||||
{else}
|
||||
|
||||
{if $rows}
|
||||
<div id="badge-layout">
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<table id="options" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="sortable">{ts}Title{/ts}</th>
|
||||
<th id="nosort">{ts}Description{/ts}</th>
|
||||
<th>{ts}Enabled?{/ts}</th>
|
||||
<th>{ts}Default?{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="print_label-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class} crm-badge-layout {if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crm-badge-layout-title crm-editable" data-field="title">{$row.title}</td>
|
||||
<td class="crm-badge-layout-description crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
|
||||
<td id="row_{$row.id}_status" class="crm-badge-layout-is_active">
|
||||
{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}
|
||||
</td>
|
||||
<td class="crm-badge-layout-is_default">
|
||||
{if $row.is_default eq 1}
|
||||
<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}"/>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1" id="newbadge-layout" icon="crm-i fa-plus-circle"}{ts}New Badge Layout{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
|
||||
{capture assign=crmURL}{crmURL p='civicrm/admin/badgelayout' q="action=add&reset=1"}{/capture}
|
||||
{ts 1=$crmURL}There are no Badge Layout entered for this Contact. You can<a href='%1'>add one</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue