Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 58966151

Von Thomas Heck vor mehr als 12 Jahren hinzugefügt

  • ID 5896615180704b3dddba46f4064a47ff1f094c3c
  • Vorgänger 261cfce2
  • Nachfolger 51d0274d

SL::Template::Plugin::L::select_tag und SL::Template::Plugin::L::options_for_select fusionieren.

Unterschiede anzeigen:

templates/webpages/am/config.html
80 80
     <tr>
81 81
      <th align="right">[% 'Date Format' | $T8 %]</th>
82 82
      <td>
83
       <select name="dateformat">
84
        [%- FOREACH row = DATEFORMATS %]
85
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
86
        [%- END %]
87
       </select>
83
        [% L.select_tag('dateformat', DATEFORMATS, value_key = 'value', title_key = 'name') %]
88 84
      </td>
89 85
     </tr>
90 86
     <tr>
91 87
      <th align="right">[% 'Output Number Format' | $T8 %]</th>
92 88
      <td>
93
       <select name="numberformat">
94
        [%- FOREACH row = NUMBERFORMATS %]
95
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
96
        [%- END %]
97
       </select>
89
        [% L.select_tag('numberformat', NUMBERFORMATS, value_key = 'value', title_key = 'name') %]
98 90
      </td>
99 91
     </tr>
100 92

  
......
106 98
     <tr>
107 99
      <th align="right">[% 'Language' | $T8 %]</th>
108 100
      <td>
109
       <select name="countrycode">
110
        [%- FOREACH row = COUNTRYCODES %]
111
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
112
        [%- END %]
113
       </select>
101
        [% L.select_tag('countrycode', COUNTRYCODES, value_key = 'value', title_key = 'name') %]
114 102
      </td>
115 103
     </tr>
116 104

  
117 105
     <tr>
118 106
      <th align="right">[% 'Stylesheet' | $T8 %]</th>
119 107
      <td>
120
       <select name="usestylesheet">
121
        [%- FOREACH row = STYLESHEETS %]
122
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
123
        [%- END %]
124
       </select>
108
        [% L.select_tag('usestylesheet', STYLESHEETS, value_key = 'value', title_key = 'name') %]
125 109
      </td>
126 110
     </tr>
127 111

  
......
169 153
     <tr>
170 154
      <th align="right">[% 'Default template format' | $T8 %]</th>
171 155
      <td>
172
       <select name="template_format">
173
        [%- FOREACH row = TEMPLATE_FORMATS %]
174
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
175
        [%- END %]
176
       </select>
156
        [% L.select_tag('template_format', TEMPLATE_FORMATS, value_key = 'value', title_key = 'name') %]
177 157
      </td>
178 158
     </tr>
179 159

  
180 160
     <tr>
181 161
      <th align="right">[% 'Default output medium' | $T8 %]</th>
182 162
      <td>
183
       <select name="default_media">
184
        [%- FOREACH row = MEDIA %]
185
        <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
186
        [%- END %]
187
       </select>
163
        [% L.select_tag('default_media', MEDIA, value_key = 'value', title_key = 'name') %]
188 164
      </td>
189 165
     </tr>
190 166

  
191 167
     <tr>
192 168
      <th align="right">[% 'Default printer' | $T8 %]</th>
193 169
      <td>
194
       [% L.select_tag('default_printer_id', L.options_for_select(PRINTERS, default => myconfig_default_printer_id, title => 'printer_description', with_empty => 1)) %]
170
       [% L.select_tag('default_printer_id', PRINTERS, default = myconfig_default_printer_id, title_key = 'printer_description', with_empty = 1) %]
195 171
      </td>
196 172
     </tr>
197 173

  

Auch abrufbar als: Unified diff