2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 <div class="crm-block crm-form-block crm-custom-field-form-block">
27 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
28 <div class='status'><div class="icon inform-icon"></div>
29 {ts}Warning: This functionality is currently in beta stage. Consider backing up your database before using it. Click "Cancel" to return to the "edit custom field" form without making changes.{/ts}
31 <table class="form-layout">
32 <tr class="crm-custom-src-field-form-block-label">
33 <td class="label">{$form.src_html_type.label}</td>
34 <td class="html-adjust">{$form.src_html_type.html}</td>
36 <tr class="crm-custom-dst-field-form-block-label">
37 <td class="label">{$form.dst_html_type.label}</td>
38 <td class="html-adjust">{$form.dst_html_type.html}</td>
41 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
44 <script type="text/Javascript">
45 function checkCustomDataField( ) {
46 var srcHtmlType = '{/literal}{$srcHtmlType}{literal}';
47 var singleValOps = ['Text', 'Select', 'Radio', 'Autocomplete-Select'];
48 var multiValOps = ['CheckBox', 'Multi-Select', 'AdvMulti-Select'];
49 var dstHtmlType = cj('#dst_html_type').val( );
54 if ( ( cj.inArray(srcHtmlType, multiValOps) > -1 ) &&
55 ( cj.inArray(dstHtmlType, singleValOps) > -1 ) ) {
56 return confirm( "{/literal}{ts escape='js'}Changing a 'multi option' html type to a 'single option' html type, might results in a data loss. Please consider to take db backup before change the html type. Click 'Ok' to continue.{/ts}{literal}" );