[% USE T8 %] [% USE HTML %] [% USE LxERP %] [% USE L %]
[% 'Select Contact' | $T8 %][% L.select_tag( 'contact.cp_id', SELF.contacts, default = SELF.contact.cp_id, with_empty = 1, empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_key = 'full_name', onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){ contactsMapWidget.testInputs(); kivi.reinit_widgets(); }});", )%]
[% contact_cvars = SELF.contact.cvars_by_config %] [% IF ( contact_cvars.size ) %] [% FOREACH var = contact_cvars %] [% END %] [% END %]
[% 'Personal details' | $T8 %]
[% 'Given Name' | $T8 %] [% L.input_tag('contact.cp_givenname', SELF.contact.cp_givenname, class="wi-wide") %]
[% 'Surname' | $T8 %] [% L.input_tag('contact.cp_name', SELF.contact.cp_name, class="wi-wide") %]
[% 'Main Contact Person' | $T8 %] [% L.yes_no_tag('contact.cp_main', SELF.contact.cp_main) %]
[% 'Gender' | $T8 %] [% L.select_tag( 'contact.cp_gender', [['m', LxERP.t8('male')], ['f', LxERP.t8('female')]], default = SELF.contact.cp_gender, class = 'wi-normal', ) %]
[% 'Birthday' | $T8 %] [% L.date_tag('contact.cp_birthday', SELF.contact.cp_birthday, class='wi-date') %]
[% 'Title' | $T8 %] [% IF INSTANCE_CONF.get_contact_titles_use_textfield %] [% 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);', class="wi-wide helper") %] [% L.input_tag('contact.cp_title', SELF.contact.cp_title, size = 40, class="wi-wide addition") %] [% ELSE %] [% L.select_tag('contact.cp_title', SELF.all_contact_titles, default = SELF.contact.cp_title, value_key = 'description', title_key = 'description', with_empty = 1, class="wi-wide helper") %] [% END %]
[% 'Project' | $T8 %] [% L.input_tag('contact.cp_project', SELF.contact.cp_project, class="wi-wide") %]
[% 'Department & Function' | $T8 %]
[% 'Department' | $T8 %] [% IF INSTANCE_CONF.get_contact_departments_use_textfield %] [% 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);', class='wi-wide helper') %] [% L.input_tag('contact.cp_abteilung', SELF.contact.cp_abteilung, size = 40, class="wi-wide addition") %] [% ELSE %] [% L.select_tag('contact.cp_abteilung', SELF.all_contact_departments, default = SELF.contact.cp_abteilung, value_key = 'description', title_key = 'description', with_empty = 1, class='wi-wide helper') %] [% END %]
[% 'Function/position' | $T8 %] [% L.input_tag('contact.cp_position', SELF.contact.cp_position, class="wi-wide") %]
[% 'Address' | $T8 %]
[% 'Street' | $T8 %] [% L.input_tag('contact.cp_street', SELF.contact.cp_street, class="wi-wide") %]
[% 'Zip, City' | $T8 %] [% L.input_tag('contact.cp_zipcode', SELF.contact.cp_zipcode, class="wi-verysmall") %][% L.input_tag('contact.cp_city', SELF.contact.cp_city, class="wi-wide--verysmall") %]
[% var.config.description | html %] [% INCLUDE 'common/render_cvar_input.html' cvar_name_prefix = 'contact_cvars.' %]
[% 'Communication' | $T8 %]
[% 'E-mail' | $T8 %] [% L.input_tag('contact.cp_email', SELF.contact.cp_email, class="wi-wide") %]
[% 'Phone1' | $T8 %] [% L.input_tag('contact.cp_phone1', SELF.contact.cp_phone1, class="wi-wide") %]
[% 'Phone2' | $T8 %] [% L.input_tag('contact.cp_phone2', SELF.contact.cp_phone2, class="wi-wide") %]
[% 'Fax' | $T8 %] [% L.input_tag('contact.cp_fax', SELF.contact.cp_fax, class="wi-wide") %]
[% 'Mobile1' | $T8 %] [% L.input_tag('contact.cp_mobile1', SELF.contact.cp_mobile1, class="wi-wide") %]
[% 'Mobile2' | $T8 %] [% L.input_tag('contact.cp_mobile2', SELF.contact.cp_mobile2, class="wi-wide") %]
[% 'Sat. Phone' | $T8 %] [% L.input_tag('contact.cp_satphone', SELF.contact.cp_satphone, class="wi-wide") %]
[% 'Sat. Fax' | $T8 %] [% L.input_tag('contact.cp_satfax', SELF.contact.cp_satfax, class="wi-wide") %]
[% 'Private Phone' | $T8 %] [% L.input_tag('contact.cp_privatphone', SELF.contact.cp_privatphone, class="wi-wide") %]
[% 'Private E-mail' | $T8 %] [% L.input_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, class="wi-wide") %]
[% L.button_tag('submitInputButton("delete_contact");', LxERP.t8('Delete Contact'), id = 'action_delete_contact', class = 'submit') %] [% IF ( !SELF.contact.cp_id ) %] [% END %]