630a6070472de6695f6bc12ff833ba1c31f45084
[kivitendo-erp.git] / templates / webpages / customer_vendor / tabs / contacts.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6 <div id="contacts">
7   <table>
8     <tr>
9       <th align="left">[% 'Contacts' | $T8 %]</th>
10
11       <td>
12         [%
13           L.select_tag(
14             'contact.cp_id',
15             SELF.contacts,
16             default = SELF.contact.cp_id,
17             with_empty = 1,
18             empty_title = LxERP.t8('New contact'),
19             value_key = 'cp_id',
20             title_key = 'full_name',
21             onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){ contactsMapWidget.testInputs(); local_reinit_widgets(); }});",
22           )
23         %]
24       </td>
25     </tr>
26
27     <tr>
28       <th align="left" nowrap>[% 'Gender' | $T8 %]</th>
29
30       <td>
31         [%
32           L.select_tag(
33             'contact.cp_gender',
34             [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]],
35             default = SELF.contact.cp_gender
36           )
37         %]
38       </td>
39     </tr>
40
41     <tr>
42       <th align="left" nowrap>[% 'Title' | $T8 %]</th>
43
44       <td>
45         [% L.input_tag('contact.cp_title', SELF.contact.cp_title, size = 40) %]
46         [% L.select_tag('contact_cp_title_select', SELF.all_titles, with_empty = 1, onchange = '$("#contact_cp_title").val(this.value);') %]
47       </td>
48     </tr>
49
50     <tr>
51       <th align="left" nowrap>[% 'Department' | $T8 %]</th>
52
53       <td>
54         [% L.input_tag('contact.cp_abteilung', SELF.contact.cp_abteilung, size = 40) %]
55         [% L.select_tag('contact_cp_abteilung_select', SELF.all_departments, default = SELF.contact.cp_abteilung,  with_empty = 1, onchange = '$("#contact_cp_abteilung").val(this.value);') %]
56       </td>
57     </tr>
58
59     <tr>
60       <th align="left" nowrap>[% 'Function/position' | $T8 %]</th>
61
62       <td>
63         [% L.input_tag('contact.cp_position', SELF.contact.cp_position, size = 40) %]
64       </td>
65     </tr>
66
67     <tr>
68       <th align="left" nowrap>[% 'Given Name' | $T8 %]</th>
69
70       <td>
71         [% L.input_tag('contact.cp_givenname', SELF.contact.cp_givenname, size = 40) %]
72       </td>
73     </tr>
74
75     <tr>
76       <th align="left" nowrap>[% 'Name' | $T8 %]</th>
77
78       <td>
79         [% L.input_tag('contact.cp_name', SELF.contact.cp_name, size = 40) %]
80       </td>
81     </tr>
82
83     <tr>
84       <th align="left" nowrap>[% 'E-mail' | $T8 %]</th>
85
86       <td>
87         [% L.input_tag('contact.cp_email', SELF.contact.cp_email, size = 40) %]
88       </td>
89     </tr>
90
91     <tr>
92       <th align="left" nowrap>[% 'Phone1' | $T8 %]</th>
93
94       <td>
95         [% L.input_tag('contact.cp_phone1', SELF.contact.cp_phone1, size = 40) %]
96       </td>
97     </tr>
98
99     <tr>
100       <th align="left" nowrap>[% 'Phone2' | $T8 %]</th>
101
102       <td>
103         [% L.input_tag('contact.cp_phone2', SELF.contact.cp_phone2, size = 40) %]
104       </td>
105     </tr>
106
107     <tr>
108       <th align="left" nowrap>[% 'Fax' | $T8 %]</th>
109
110       <td>
111         [% L.input_tag('contact.cp_fax', SELF.contact.cp_fax, size = 40) %]
112       </td>
113     </tr>
114
115     <tr>
116       <th align="left" nowrap>[% 'Mobile1' | $T8 %]</th>
117
118       <td>
119         [% L.input_tag('contact.cp_mobile1', SELF.contact.cp_mobile1, size = 40) %]
120       </td>
121     </tr>
122
123     <tr>
124       <th align="left" nowrap>[% 'Mobile2' | $T8 %]</th>
125
126       <td>
127         [% L.input_tag('contact.cp_mobile2', SELF.contact.cp_mobile2, size = 40) %]
128       </td>
129     </tr>
130
131     <tr>
132       <th align="left" nowrap>[% 'Sat. Phone' | $T8 %]</th>
133
134       <td>
135         [% L.input_tag('contact.cp_satphone', SELF.contact.cp_satphone, size = 40) %]
136       </td>
137     </tr>
138
139     <tr>
140       <th align="left" nowrap>[% 'Sat. Fax' | $T8 %]</th>
141
142       <td>
143         [% L.input_tag('contact.cp_satfax', SELF.contact.cp_satfax, size = 40) %]
144       </td>
145     </tr>
146
147     <tr>
148       <th align="left" nowrap>[% 'Project' | $T8 %]</th>
149
150       <td>
151         [% L.input_tag('contact.cp_project', SELF.contact.cp_project, size = 40) %]
152       </td>
153     </tr>
154
155     <tr>
156       <th align="left" nowrap>[% 'Street' | $T8 %]</th>
157
158       <td>
159         [% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40) %]
160         <span id="contact_map"></span>
161         <script type="text/javascript">
162           var contactsMapWidget = new kivi.CustomerVendor.MapWidget('contact_cp_');
163           $(function() {
164             contactsMapWidget.render($('#contact_map'));
165           });
166         </script>
167       </td>
168     </tr>
169
170     <tr>
171       <th align="left" nowrap>[% 'Zip, City' | $T8 %]</th>
172
173       <td>
174         [% L.input_tag('contact.cp_zipcode', SELF.contact.cp_zipcode, size = 5) %]
175         [% L.input_tag('contact.cp_city', SELF.contact.cp_city, size = 25) %]
176       </td>
177     </tr>
178
179     <tr>
180       <th align="left" nowrap>[% 'Private Phone' | $T8 %]</th>
181
182       <td>
183         [% L.input_tag('contact.cp_privatphone', SELF.contact.cp_privatphone, size = 40) %]
184       </td>
185     </tr>
186
187     <tr>
188       <th align="left" nowrap>[% 'Private E-mail' | $T8 %]</th>
189
190       <td>
191         [% L.input_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, size = 40) %]
192       </td>
193     </tr>
194
195     <tr>
196       <th align="left" nowrap>[% 'Birthday' | $T8 %]</th>
197
198       <td>
199         [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday) %]
200       </td>
201     </tr>
202
203     [% contact_cvars = SELF.contact.cvars_by_config %]
204
205     [% IF ( contact_cvars.size ) %]
206       <tr>
207         <td colspan="2">
208           <hr>
209         </td>
210       </tr>
211
212       [% FOREACH var = contact_cvars %]
213         <tr>
214           <th align="left" valign="top" nowrap>[% var.config.description | html %]</th>
215
216           <td valign="top">
217             [% INCLUDE 'common/render_cvar_input.html'
218                        cvar_name_prefix = 'contact_cvars.'
219             %]
220           </td>
221         </tr>
222       [% END %]
223     [% END %]
224
225   </table>
226
227   [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Contact'), name = 'action_delete_contact', class = 'submit') %]
228   [% IF ( !SELF.contact.cp_id ) %]
229     <script type="text/javascript">
230       $('#action_delete_contact').hide();
231     </script>
232   [% END %]
233 </div>