Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f1552890

Von Sven Schöling vor mehr als 13 Jahren hinzugefügt

  • ID f15528902d0fc633e86d08e1da7c0753fa076cc7
  • Vorgänger 1b522616
  • Nachfolger 1df2efff

Auch hier unnötige multiboxen auf L.select_tags umgestellt.

Unterschiede anzeigen:

templates/webpages/oe/form_header.html
63 63
                  <tr>
64 64
                    <th align="right">[% 'Contact Person' | $T8 %]</th>
65 65
                    <td>
66
                      [%- INCLUDE 'generic/multibox.html'
67
                           name       = 'cp_id',
68
                           style      = 'width: 250px',
69
                           DATA       = ALL_CONTACTS,
70
                           id_key     = 'cp_id',
71
                           label_sub  = 'contact_labels',
72
                           show_empty = 1 -%]
66
                      [% L.select_tag('cp_id', L.options_for_select(ALL_CONTACTS, default=cp_id, value='cp_id', title_sub=\contact_labels, with_empty=1), style='width: 250px') %]
73 67
                    </td>
74 68
                  </tr>
75 69
[%- END %]
......
77 71
                  <tr>
78 72
                    <th align="right">[% 'Shipping Address' | $T8 %]</th>
79 73
                    <td>
80
                      [%- INCLUDE 'generic/multibox.html'
81
                           name       = 'shipto_id',
82
                           style      = 'width: 250px',
83
                           DATA       = ALL_SHIPTO,
84
                           id_key     = 'shipto_id',
85
                           label_sub  = 'shipto_labels',
86
                           show_empty = 1,
87
                           onChange   = "document.getElementById('update_button').click();" -%]
74
                      [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
88 75
                    </td>
89 76
                  </tr>
90 77
[%- END %]
......
112 99
                  <tr>
113 100
                    <th align="right">[% 'Steuersatz' | $T8 %]</th>
114 101
                    <td>
115
                      [%- INCLUDE 'generic/multibox.html'
116
                           name       = 'taxzone_id',
117
                           style      = 'width: 250px',
118
                           DATA       = ALL_TAXZONES,
119
                           id_key     = 'id',
120
                           label_key  = 'description' -%]
102
                      [% L.select_tag('taxzone_id', L.options_for_select(ALL_TAXZONES, default=taxzone_id, title='description'), style='width: 250px') %]
121 103
                    </td>
122 104
                  </tr>
123 105
[%- IF ALL_DEPARTMENTS %]
124 106
                  <tr>
125 107
                    <th align="right" nowrap>[% 'Department' | $T8 %]</th>
126 108
                    <td colspan="3">
127
                      [%- INCLUDE 'generic/multibox.html'
128
                           name       = 'department_id',
129
                           style      = 'width: 250px',
130
                           DATA       = ALL_DEPARTMENTS,
131
                           id_key     = 'id',
132
                           label_sub  = 'department_labels',
133
                           show_empty = 1 -%]
109
                      [% L.select_tag('department_id', L.options_for_select(ALL_DEPARTMENTS, default=department_id, title_sub=\department_labels, with_empty=1), style='width:250px') %]
134 110
                    </td>
135 111
                  </tr>
136 112
[%- END %]
......
195 171
                  <tr>
196 172
                    <th align="right">[% 'Employee' | $T8 %]</th>
197 173
                    <td>
198
                      [%- INCLUDE 'generic/multibox.html'
199
                           name       = 'employee_id',
200
                           DATA       = ALL_EMPLOYEES,
201
                           id_key     = 'id',
202
                           label_sub  = 'sales_employee_labels' -%]
174
                      [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title_sub=\sales_employee_labels)) %]
203 175
                    </td>
204 176
                  </tr>
205 177
[%- IF is_sales and ALL_SALESMEN.size %]
206 178
                  <tr>
207 179
                    <th align="right">[% 'Salesman' | $T8 %]</th>
208 180
                    <td>
209
                      [%- INCLUDE 'generic/multibox.html'
210
                           name       = 'salesman_id',
211
                           default    = salesman_id ? salesman_id : employee_id,
212
                           DATA       = ALL_SALESMEN,
213
                           id_key     = 'id',
214
                           label_sub  = 'sales_employee_labels' -%]
181
                      [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_sub=\sales_employee_labels)) %]
215 182
                    </td>
216 183
                  </tr>
217 184
[%- END %]
......
262 229
                  <tr>
263 230
                    <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
264 231
                    <td>
265
                      [%- INCLUDE 'generic/multibox.html'
266
                           name       = 'globalproject_id',
267
                           DATA       = ALL_PROJECTS,
268
                           id_key     = 'id',
269
                           label_key  = 'projectnumber',
270
                           show_empty = 1,
271
                           onChange   = "document.getElementById('update_button').click();" -%]
232
                      [%- L.select_tag('globalproject_id', L.options_for_select(ALL_PROJECTS, title='projectnumber', default=globalproject_id, with_empty='1'), onChange="document.getElementById('update_button').click();") %]
272 233
                    </td>
273 234
                  </tr>
274 235
                </table>

Auch abrufbar als: Unified diff