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