SL::Template::Plugin::L::select_tag und SL::Template::Plugin::L::options_for_select...
[kivitendo-erp.git] / templates / webpages / ct / _contact.html
index 528ad8d..bfa4f37 100644 (file)
@@ -4,8 +4,8 @@
      <tr>
       <th align="left">[% 'Contacts' | $T8 %]</th>
       <td>
-       [%- L.select_tag('cp_id', L.options_for_select(CONTACTS, default => cp_id, with_empty => 1, empty_title => LxERP.t8('New contact'), value => 'cp_id', title_sub => \contacts_label),
-                        onchange => "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
+       [%- L.select_tag('cp_id', CONTACTS, default = cp_id, with_empty = 1, empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_sub = \contacts_label,
+                        onchange = "\$('#contacts').load('ct.pl?action=get_contact&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&cp_id=' + \$('#cp_id').attr('value'))") %]
       </td>
      </tr>
 
@@ -23,7 +23,7 @@
       <th align="left" nowrap>[% 'Title' | $T8 %]</th>
       <td>
        <input id="cp_title" name="cp_title" size="40" maxlength="75" value="[% HTML.escape(cp_title) %]">&nbsp;
-       [% L.select_tag('selected_cp_title', L.options_for_select(TITLES, with_empty => 1)) %]
+       [% L.select_tag('selected_cp_title', TITLES, with_empty = 1) %]
       </td>
      </tr>
 
@@ -31,7 +31,7 @@
       <th align="left" nowrap>[% 'Department' | $T8 %]</th>
       <td>
        <input id="cp_abteilung" name="cp_abteilung" size="40" value="[% HTML.escape(cp_abteilung) %]">&nbsp;
-       [% L.select_tag('selected_cp_abteilung', L.options_for_select(DEPARTMENT, with_empty => 1)) %]
+       [% L.select_tag('selected_cp_abteilung', DEPARTMENT, with_empty = 1) %]
       </td>
      </tr>