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