9 <th align="right">[% 'Contacts' | $T8 %]</th>
16 default = SELF.contact.cp_id,
18 empty_title = LxERP.t8('New contact'),
20 title_key = 'full_name',
21 onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){ contactsMapWidget.testInputs(); kivi.reinit_widgets(); }});",
27 <th align="right" nowrap>[% 'Main Contact Person' | $T8 %]</th>
28 <td>[% L.yes_no_tag('contact.cp_main', SELF.contact.cp_main) %]</td>
31 <th align="right" nowrap>[% 'Gender' | $T8 %]</th>
37 [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]],
38 default = SELF.contact.cp_gender
45 <th align="right" nowrap>[% 'Title' | $T8 %]</th>
48 [%- IF INSTANCE_CONF.get_contact_titles_use_textfield -%]
49 [% L.input_tag('contact.cp_title', SELF.contact.cp_title, size = 40) %]
50 [% 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);') %]
52 [% L.select_tag('contact.cp_title', SELF.all_contact_titles, default = SELF.contact.cp_title, value_key = 'description', title_key = 'description', with_empty = 1) %]
58 <th align="right" nowrap>[% 'Department' | $T8 %]</th>
61 [%- IF INSTANCE_CONF.get_contact_departments_use_textfield -%]
62 [% L.input_tag('contact.cp_abteilung', SELF.contact.cp_abteilung, size = 40) %]
63 [% 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);') %]
65 [% L.select_tag('contact.cp_abteilung', SELF.all_contact_departments, default = SELF.contact.cp_abteilung, value_key = 'description', title_key = 'description', with_empty = 1) %]
71 <th align="right" nowrap>[% 'Function/position' | $T8 %]</th>
74 [% L.input_tag('contact.cp_position', SELF.contact.cp_position, size = 40) %]
79 <th align="right" nowrap>[% 'Given Name' | $T8 %]</th>
82 [% L.input_tag('contact.cp_givenname', SELF.contact.cp_givenname, size = 40) %]
87 <th align="right" nowrap>[% 'Surname' | $T8 %]</th>
90 [% L.input_tag('contact.cp_name', SELF.contact.cp_name, size = 40) %]
95 <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
98 [% L.input_tag('contact.cp_email', SELF.contact.cp_email, size = 40) %]
103 <th align="right" nowrap>[% 'Phone1' | $T8 %]</th>
106 [% L.input_tag('contact.cp_phone1', SELF.contact.cp_phone1, size = 40) %]
111 <th align="right" nowrap>[% 'Phone2' | $T8 %]</th>
114 [% L.input_tag('contact.cp_phone2', SELF.contact.cp_phone2, size = 40) %]
119 <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
122 [% L.input_tag('contact.cp_fax', SELF.contact.cp_fax, size = 40) %]
127 <th align="right" nowrap>[% 'Mobile1' | $T8 %]</th>
130 [% L.input_tag('contact.cp_mobile1', SELF.contact.cp_mobile1, size = 40) %]
135 <th align="right" nowrap>[% 'Mobile2' | $T8 %]</th>
138 [% L.input_tag('contact.cp_mobile2', SELF.contact.cp_mobile2, size = 40) %]
143 <th align="right" nowrap>[% 'Sat. Phone' | $T8 %]</th>
146 [% L.input_tag('contact.cp_satphone', SELF.contact.cp_satphone, size = 40) %]
151 <th align="right" nowrap>[% 'Sat. Fax' | $T8 %]</th>
154 [% L.input_tag('contact.cp_satfax', SELF.contact.cp_satfax, size = 40) %]
159 <th align="right" nowrap>[% 'Project' | $T8 %]</th>
162 [% L.input_tag('contact.cp_project', SELF.contact.cp_project, size = 40) %]
167 <th align="right" nowrap>[% 'Street' | $T8 %]</th>
170 [% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40) %]
171 <span id="contact_map"></span>
172 <script type="text/javascript">
173 var contactsMapWidget = new kivi.CustomerVendor.MapWidget('contact_cp_');
175 contactsMapWidget.render($('#contact_map'));
182 <th align="right" nowrap>[% 'Zip, City' | $T8 %]</th>
185 [% L.input_tag('contact.cp_zipcode', SELF.contact.cp_zipcode, size = 5) %]
186 [% L.input_tag('contact.cp_city', SELF.contact.cp_city, size = 25) %]
191 <th align="right" nowrap>[% 'Private Phone' | $T8 %]</th>
194 [% L.input_tag('contact.cp_privatphone', SELF.contact.cp_privatphone, size = 40) %]
199 <th align="right" nowrap>[% 'Private E-mail' | $T8 %]</th>
202 [% L.input_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, size = 40) %]
207 <th align="right" nowrap>[% 'Birthday' | $T8 %]</th>
210 [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday) %]
214 [% contact_cvars = SELF.contact.cvars_by_config %]
216 [% IF ( contact_cvars.size ) %]
223 [% FOREACH var = contact_cvars %]
225 <th align="right" valign="top" nowrap>[% var.config.description | html %]</th>
228 [% INCLUDE 'common/render_cvar_input.html'
229 cvar_name_prefix = 'contact_cvars.'
238 [% L.button_tag('submitInputButton("delete_contact");', LxERP.t8('Delete Contact'), id = 'action_delete_contact', class = 'submit') %]
239 [% IF ( !SELF.contact.cp_id ) %]
240 <script type="text/javascript">
241 $('#action_delete_contact').hide();