]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/SugarFields/Fields/Address/en_us.EditView.tpl
Release 6.4.0
[Github/sugarcrm.git] / include / SugarFields / Fields / Address / en_us.EditView.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 *}
38 <script type="text/javascript" src='{sugar_getjspath file="include/SugarFields/Fields/Address/SugarFieldAddress.js"}'></script>
39 {{assign var="key" value=$displayParams.key|upper}}
40 {{assign var="street" value=$displayParams.key|cat:'_address_street'}}
41 {{assign var="city" value=$displayParams.key|cat:'_address_city'}}
42 {{assign var="state" value=$displayParams.key|cat:'_address_state'}}
43 {{assign var="country" value=$displayParams.key|cat:'_address_country'}}
44 {{assign var="postalcode" value=$displayParams.key|cat:'_address_postalcode'}}
45 <fieldset id='{{$key}}_address_fieldset'>
46 <legend>{sugar_translate label='LBL_{{$key}}_ADDRESS' module='{{$module}}'}</legend>
47 <table border="0" cellspacing="1" cellpadding="0" class="edit" width="100%">
48 <tr>
49 <td valign="top" id="{{$street}}_label" width='25%' scope='row' >
50 <label for="{{$street}}">{sugar_translate label='LBL_{{$key}}_STREET' module='{{$module}}'}:</label>
51 {if $fields.{{$street}}.required || {{if $street|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
52 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>
53 {/if}
54 </td>
55 <td width="*">
56 {{if $displayParams.maxlength}}
57 <textarea id="{{$street}}" name="{{$street}}" maxlength="{{$displayParams.maxlength}}" rows="{{$displayParams.rows|default:4}}" cols="{{$displayParams.cols|default:60}}" tabindex="{{$tabindex}}">{$fields.{{$street}}.value}</textarea>
58 {{else}}
59 <textarea id="{{$street}}" name="{{$street}}" rows="{{$displayParams.rows|default:4}}" cols="{{$displayParams.cols|default:60}}" tabindex="{{$tabindex}}">{$fields.{{$street}}.value}</textarea>
60 {{/if}}
61 </td>
62 </tr>
63
64 <tr>
65
66 <td id="{{$city}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >
67 <label for="{{$city}}">{sugar_translate label='LBL_CITY' module='{{$module}}'}:
68 {if $fields.{{$city}}.required || {{if $city|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
69 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>
70 {/if}
71 </td>
72 <td>
73 <input type="text" name="{{$city}}" id="{{$city}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$city}}.value}' tabindex="{{$tabindex}}">
74 </td>
75 </tr>
76
77 <tr>
78 <td id="{{$state}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >
79 <label for="{{$state}}">{sugar_translate label='LBL_STATE' module='{{$module}}'}:</label>
80 {if $fields.{{$state}}.required || {{if $state|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
81 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>
82 {/if}
83 </td>
84 <td>
85 <input type="text" name="{{$state}}" id="{{$state}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$state}}.value}' tabindex="{{$tabindex}}">
86 </td>
87 </tr>
88
89 <tr>
90
91 <td id="{{$postalcode}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >
92
93 <label for="{{$postalcode}}">{sugar_translate label='LBL_POSTAL_CODE' module='{{$module}}'}:</label>
94 {if $fields.{{$postalcode}}.required || {{if $postalcode|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
95 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>
96 {/if}
97 </td>
98 <td>
99 <input type="text" name="{{$postalcode}}" id="{{$postalcode}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$postalcode}}.value}' tabindex="{{$tabindex}}">
100 </td>
101 </tr>
102
103 <tr>
104
105 <td id="{{$country}}_label" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].label}}%' scope='row' >
106
107 <label for="{{$country}}">{sugar_translate label='LBL_COUNTRY' module='{{$module}}'}:</label>
108 {if $fields.{{$country}}.required || {{if $country|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
109 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>
110 {/if}
111 </td>
112 <td>
113 <input type="text" name="{{$country}}" id="{{$country}}" size="{{$displayParams.size|default:30}}" {{if !empty($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} value='{$fields.{{$country}}.value}' tabindex="{{$tabindex}}">
114 </td>
115 </tr>
116
117 {{if $displayParams.copy}}
118 <tr>
119 <td scope='row' NOWRAP>
120 {sugar_translate label='LBL_COPY_ADDRESS_FROM_LEFT' module=''}:
121 </td>
122 <td>
123 <input id="{{$displayParams.key}}_checkbox" name="{{$displayParams.key}}_checkbox" type="checkbox" onclick="{{$displayParams.key}}_address.syncFields();">
124 </td>
125 </tr>
126 {{else}}
127 <tr>
128 <td colspan='2' NOWRAP>&nbsp;</td>
129 </tr>
130 {{/if}}
131 </table>
132 </fieldset>
133 <script type="text/javascript">
134     SUGAR.util.doWhen("typeof(SUGAR.AddressField) != 'undefined'", function(){ldelim}
135                 {{$displayParams.key}}_address = new SUGAR.AddressField("{{$displayParams.key}}_checkbox",'{{$displayParams.copy}}', '{{$displayParams.key}}');
136         {rdelim});
137 </script>