Weightunit im Standarddialog mit Dropdownbox auswählen.
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 3 Sep 2009 17:01:56 +0000 (19:01 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 3 Sep 2009 17:01:56 +0000 (19:01 +0200)
Fix für Bug 1118.

bin/mozilla/am.pl
templates/webpages/am/edit_defaults_de.html
templates/webpages/am/edit_defaults_master.html

index 2394118..6846326 100644 (file)
@@ -2397,6 +2397,7 @@ sub edit_defaults {
 
   # get defaults for account numbers and last numbers
   AM->defaultaccounts(\%myconfig, \%$form);
+  $form->{ALL_UNITS} = AM->convertible_units(AM->retrieve_all_units(), 'g');
 
   map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
 
index ffd534d..c4298c7 100644 (file)
 
     <tr>
      <th align="right">Gewichtseinheit</th>
-     <td colspan="3"><input name="weightunit" size="20" maxlength="5" value="[% HTML.escape(defaults_weightunit) %]"></td>
+ <!--    <td colspan="3"><input name="weightunit" size="20" maxlength="5" value="[% HTML.escape(defaults_weightunit) %]"></td> -->
+     <td>
+      [%- INCLUDE 'generic/multibox.html'
+           name          = 'weightunit',
+           default       = defaults_weightunit,
+           style         = 'size:20; maxength:5',
+           DATA          = ALL_UNITS,
+           id_key        = 'name',
+           label_key     = 'name',
+           -%]
+      </td>
     </tr>
 
    </table>
index 47693c6..f73ea15 100644 (file)
 
     <tr>
      <th align="right"><translate>Weight unit</translate></th>
-     <td colspan="3"><input name="weightunit" size="20" maxlength="5" value="[% HTML.escape(defaults_weightunit) %]"></td>
+ <!--    <td colspan="3"><input name="weightunit" size="20" maxlength="5" value="[% HTML.escape(defaults_weightunit) %]"></td> -->
+     <td>
+      [%- INCLUDE 'generic/multibox.html'
+           name          = 'weightunit',
+           default       = defaults_weightunit,
+           style         = 'size:20; maxength:5',
+           DATA          = ALL_UNITS,
+           id_key        = 'name',
+           label_key     = 'name',
+           -%]
+      </td>
     </tr>
 
    </table>