2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
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 {assign var="element_name" value=$element.element_name}
28 {if $element.help_pre}
29 <tr class="custom_field-help-pre-row {$element.element_name}-row-help-pre">
31 <td class="html-adjust description">{$element.help_pre}</td>
34 {if $element.options_per_line != 0 }
35 <tr class="custom_field-row {$element.element_name}-row">
36 <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$element.label}{/if}</td>
37 <td class="html-adjust">
38 {assign var="count" value="1"}
39 <table class="form-layout-compressed" style="margin-top: -0.5em;">
41 {* sort by fails for option per line. Added a variable to iterate through the element array*}
42 {assign var="index" value="1"}
43 {foreach name=outer key=key item=item from=$form.$element_name}
45 {assign var="index" value=`$index+1`}
47 <td class="labels font-light">{$form.$element_name.$key.html}</td>
48 {if $count == $element.options_per_line}
51 {assign var="count" value="1"}
53 {assign var="count" value=`$count+1`}
57 {if $element.html_type eq 'Radio' and $element.is_view eq 0}
58 <td><span class="crm-clear-link">(<a href="#" title="unselect" onclick="unselectRadio('{$element_name}', '{$form.formName}'); return false;" >{ts}clear{/ts}</a>)</span></td>
66 <tr class="custom_field-row {$element.element_name}-row">
67 <td class="label">{$form.$element_name.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$element.label}{/if}</td>
68 <td class="html-adjust">
69 {if $element.data_type neq 'Date' OR ($element.data_type eq 'Date' AND $element.is_view eq 1)}
70 {$form.$element_name.html}
71 {elseif $element.skip_calendar NEQ true}
72 {include file="CRM/common/jcalendar.tpl" elementName=$element_name}
75 {if $element.html_type eq 'Radio' and $element.is_view eq 0}
76 <span class="crm-clear-link">(<a href="#" title="unselect" onclick="unselectRadio('{$element_name}', '{$form.formName}'); return false;" >{ts}clear{/ts}</a>)</span>
77 {elseif $element.data_type eq 'File'}
78 {if $element.element_value.data}
79 <div id="attachStatusMesg_{$element_name}" class="status hiddenElement"></div>
80 <div id="attachFile_{$element_name}">
81 <span class="html-adjust"><br />
82 {ts}Attached File{/ts}:
83 {if $element.element_value.displayURL}
84 <a href="#" onclick="popUp('{$element.element_value.imageURL}'); return false;" ><img src="{$element.element_value.displayURL}" height = "{$element.element_value.imageThumbHeight}" width="{$element.element_value.imageThumbWidth}"></a>
86 <a href="{$element.element_value.fileURL}">{$element.element_value.fileName}</a>
88 {if $element.element_value.deleteURL}
89 <a href="#" onclick="showDeleteAttachment('{$element.element_value.fileName}', '{$element.element_value.deleteURLArgs}', {$element.element_value.fid}, '#attachStatusMesg_{$element_name}', '#attachFile_{$element_name}'); return false;" title="{ts}Delete this file{/ts}"><span class="icon red-icon delete-icon" style="margin:0px 0px -5px 20px" title="{ts}Delete this file{/ts}"></span></a>
94 {elseif $element.html_type eq 'Autocomplete-Select'}
95 {if $element.data_type eq 'ContactReference'}
96 {include file="CRM/Custom/Form/ContactReference.tpl"}
98 {include file="CRM/Custom/Form/AutoComplete.tpl"}