10 <th align="right">[% 'Contacts' | $T8 %]</th>
17 default = SELF.contact.cp_id,
19 empty_title = LxERP.t8('New contact'),
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(); }});",
30 <th align="right" nowrap>[% 'Main Contact Person' | $T8 %]</th>
31 <td>[% L.yes_no_tag('contact.cp_main', SELF.contact.cp_main) %]</td>
34 <th align="right" nowrap>[% 'Gender' | $T8 %]</th>
40 [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]],
41 default = SELF.contact.cp_gender
48 <th align="right" nowrap>[% 'Title' | $T8 %]</th>
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);') %]
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) %]
61 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
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);') %]
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) %]
74 <th align="right" nowrap>[% 'Function/position' | $T8 %]</th>
77 [% L.input_tag_trim('contact.cp_position', SELF.contact.cp_position, size = 40) %]
82 <th align="right" nowrap>[% 'Given Name' | $T8 %]</th>
85 [% L.input_tag_trim('contact.cp_givenname', SELF.contact.cp_givenname, size = 40) %]
90 <th align="right" nowrap>[% 'Surname' | $T8 %]</th>
93 [% L.input_tag_trim('contact.cp_name', SELF.contact.cp_name, size = 40) %]
98 <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
101 [% P.input_email_tag('contact.cp_email', SELF.contact.cp_email, class = 'update_email', size = 40) %]
106 <th align="right" nowrap>[% 'Phone1' | $T8 %]</th>
109 [% L.input_tag_trim('contact.cp_phone1', SELF.contact.cp_phone1, size = 40) %]
114 <th align="right" nowrap>[% 'Phone2' | $T8 %]</th>
117 [% L.input_tag_trim('contact.cp_phone2', SELF.contact.cp_phone2, size = 40) %]
122 <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
125 [% L.input_tag_trim('contact.cp_fax', SELF.contact.cp_fax, size = 40) %]
130 <th align="right" nowrap>[% 'Mobile1' | $T8 %]</th>
133 [% L.input_tag_trim('contact.cp_mobile1', SELF.contact.cp_mobile1, size = 40) %]
138 <th align="right" nowrap>[% 'Mobile2' | $T8 %]</th>
141 [% L.input_tag_trim('contact.cp_mobile2', SELF.contact.cp_mobile2, size = 40) %]
146 <th align="right" nowrap>[% 'Sat. Phone' | $T8 %]</th>
149 [% L.input_tag_trim('contact.cp_satphone', SELF.contact.cp_satphone, size = 40) %]
154 <th align="right" nowrap>[% 'Sat. Fax' | $T8 %]</th>
157 [% L.input_tag_trim('contact.cp_satfax', SELF.contact.cp_satfax, size = 40) %]
162 <th align="right" nowrap>[% 'Project' | $T8 %]</th>
165 [% L.input_tag_trim('contact.cp_project', SELF.contact.cp_project, size = 40) %]
170 <th align="right" nowrap>[% 'Street' | $T8 %]</th>
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_');
178 contactsMapWidget.render($('#contact_map'));
185 <th align="right" nowrap>[% 'Zip, City' | $T8 %]</th>
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) %]
194 <th align="right" nowrap>[% 'Private Phone' | $T8 %]</th>
197 [% L.input_tag_trim('contact.cp_privatphone', SELF.contact.cp_privatphone, size = 40) %]
202 <th align="right" nowrap>[% 'Private E-mail' | $T8 %]</th>
205 [% P.input_email_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, class = 'update_email', size = 40) %]
210 <th align="right" nowrap>[% 'Birthday' | $T8 %]</th>
213 [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday) %]
217 [% contact_cvars = SELF.contact.cvars_by_config %]
219 [% IF ( contact_cvars.size ) %]
226 [% FOREACH var = contact_cvars %]
228 <th align="right" valign="top" nowrap>[% var.config.description | html %]</th>
231 [% INCLUDE 'common/render_cvar_input.html'
232 cvar_name_prefix = 'contact_cvars.'
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();