Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
6 | +--------------------------------------------------------------------+ | |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
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. | | |
12 | | | | |
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. | | |
17 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {assign var="element_name" value=$element.element_custom_name} | |
27 | {if $element.is_view eq 0}{* fix for CRM-3510 *} | |
28 | {if $element.help_pre} | |
29 | <tr> | |
30 | <td> </td> | |
31 | <td class="html-adjust description">{$element.help_pre}</td> | |
32 | </tr> | |
33 | {/if} | |
34 | {if $element.options_per_line != 0 } | |
35 | <tr> | |
36 | <td class="label">{$form.address.$blockId.$element_name.label}</td> | |
37 | <td class="html-adjust"> | |
38 | {assign var="count" value="1"} | |
39 | <table class="form-layout-compressed" style="margin-top: -0.5em;"> | |
40 | <tr> | |
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.address.$blockId.$element_name} | |
44 | {if $index < 10} | |
45 | {assign var="index" value=`$index+1`} | |
46 | {else} | |
47 | <td class="labels font-light">{$form.address.$blockId.$element_name.$key.html}</td> | |
48 | {if $count == $element.options_per_line} | |
49 | </tr> | |
50 | <tr> | |
51 | {assign var="count" value="1"} | |
52 | {else} | |
53 | {assign var="count" value=`$count+1`} | |
54 | {/if} | |
55 | {/if} | |
56 | {/foreach} | |
57 | {if $element.html_type eq 'Radio'} | |
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> | |
59 | {/if} | |
60 | </tr> | |
61 | </table> | |
62 | </td> | |
63 | </tr> | |
64 | ||
65 | {if $element.help_post} | |
66 | <tr> | |
67 | <td> </td> | |
68 | <td class="description">{$element.help_post}<br /> </td> | |
69 | </tr> | |
70 | {/if} | |
71 | {else} | |
72 | <tr> | |
73 | <td class="label">{$form.address.$blockId.$element_name.label}</td> | |
74 | <td class="html-adjust"> | |
75 | {if $element.data_type neq 'Date'} | |
76 | {$form.address.$blockId.$element_name.html} | |
77 | {elseif $element.skip_calendar NEQ true } | |
78 | {include file="CRM/common/jcalendar.tpl" blockId=$blockId blockSection='address' elementName=$element_name} | |
79 | {/if} | |
80 | ||
81 | {if $element.html_type eq 'Radio'} | |
82 | <span class="crm-clear-link">(<a href="#" title="unselect" onclick="unselectRadio('address[{$blockId}][{$element_name}]', '{$form.formName}'); return false;" >{ts}clear{/ts}</a>)</span> | |
83 | ||
84 | {elseif $element.data_type eq 'File'} | |
85 | {if $element.element_value.data} | |
86 | <span class="html-adjust"><br /> | |
87 | {ts}Attached File{/ts}: | |
88 | {if $element.element_value.displayURL } | |
738107d9 C |
89 | <a href="{$element.element_value.displayURL}" class='crm-image-popup'> |
90 | <img src="{$element.element_value.displayURL}" height = "100" width="100"> | |
91 | </a> | |
6a488035 TO |
92 | {else} |
93 | <a href="{$element.element_value.fileURL}">{$element.element_value.fileName}</a> | |
94 | {/if} | |
95 | {if $element.element_value.deleteURL } | |
96 | <br /> | |
97 | {$element.element_value.deleteURL} | |
98 | {/if} | |
99 | </span> | |
100 | {/if} | |
101 | {elseif $element.html_type eq 'Autocomplete-Select'} | |
102 | {assign var="element_name" value="address[$blockId][$element_name]" } | |
103 | {if $element.data_type eq 'ContactReference'} | |
104 | {include file="CRM/Custom/Form/ContactReference.tpl"} | |
105 | {else} | |
106 | {include file="CRM/Custom/Form/AutoComplete.tpl"} | |
107 | {/if} | |
108 | {/if} | |
109 | </td> | |
110 | </tr> | |
111 | ||
112 | {if $element.help_post} | |
113 | ||
114 | <td> </td> | |
115 | <td class="description">{$element.help_post}<br /> </td> | |
116 | </tr> | |
117 | {/if} | |
118 | {/if} | |
119 | {/if} |