2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {capture assign=infoTitle}{ts}Preview Mode{/ts}{/capture}
27 {assign var="infoType" value="info"}
28 {if $preview_type eq 'group'}
29 {capture assign=infoMessage}{ts}Showing the custom data group (fieldset) as it will be displayed within an edit form.{/ts}{/capture}
31 {foreach from=$groupTree item=fieldName}
36 {capture assign=infoMessage}{ts}Showing this field as it will be displayed in an edit form.{/ts}{/capture}
38 {include file="CRM/common/info.tpl"}
39 <div class="crm-block crm-form-block crm-custom-preview-form-block">
42 {foreach from=$groupTree item=cd_edit key=group_id}
44 <fieldset>{if $preview_type eq 'group'}<legend>{$smarty.capture.legend}</legend>{/if}
45 {if $cd_edit.help_pre}<div class="messages help">{$cd_edit.help_pre}</div><br />{/if}
46 <table class="form-layout-compressed">
47 {foreach from=$cd_edit.fields item=element key=field_id}
48 {if $element.is_view eq 0}{* fix for CRM-2699 *}
49 {if $element.help_pre}
50 <tr><td class="label"></td><td class="description">{$element.help_pre}</td></tr>
52 {if $element.options_per_line }
53 {*assign var="element_name" value=$element.custom_group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*}
54 {assign var="element_name" value=$element.element_name}
56 <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
58 {assign var="count" value="1"}
59 <table class="form-layout-compressed">
61 {* sort by fails for option per line. Added a variable to iterate through the element array*}
62 {assign var="index" value="1"}
63 {foreach name=outer key=key item=item from=$form.$element_name}
65 {assign var="index" value=`$index+1`}
67 <td class="labels font-light">{$form.$element_name.$key.html}</td>
68 {if $count == $element.options_per_line}
69 {assign var="count" value="1"}
72 {assign var="count" value=`$count+1`}
76 {if $element.html_type eq 'Radio'}
78 <td><span class="crm-clear-link">(<a href="#" title="unselect" onclick="unselectRadio('{$element_name}', '{$form.formName}'); return false;" >{ts}clear{/ts}</a>)</span></td>
85 {assign var="name" value=`$element.name`}
86 {*assign var="element_name" value=$group_id|cat:_|cat:$field_id|cat:_|cat:$element.name*}
87 {assign var="element_name" value=$element.element_name}
89 <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$form.$element_name.label}{/if}</td>
91 {if $element.data_type neq 'Date'}
92 {$form.$element_name.html}
93 {elseif $element.skip_calendar NEQ true }
94 {include file="CRM/common/jcalendar.tpl" elementName=$element_name}
96 {if $element.html_type eq 'Radio'}
97 <span class="crm-clear-link">(<a href="#" title="unselect" onclick="unselectRadio('{$element_name}', '{$form.formName}'); return false;" >{ts}clear{/ts}</a>)</span>
98 {elseif $element.html_type eq 'Autocomplete-Select'}
99 {if $element.data_type eq 'ContactReference'}
100 {include file="CRM/Custom/Form/ContactReference.tpl"}
102 {include file="CRM/Custom/Form/AutoComplete.tpl"}
110 {if $cd_edit.help_post}<br /><div class="messages help">{$cd_edit.help_post}</div>{/if}
114 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>