]> wagnertech.de Git - kivitendo-erp.git/commitdiff
CVars: Options für textfield und text mit den configs setzen.
authorBernd Blessmann <bibi@online.de>
Thu, 10 May 2012 19:37:41 +0000 (21:37 +0200)
committerBernd Blessmann <bibi@online.de>
Thu, 10 May 2012 19:37:41 +0000 (21:37 +0200)
Sonst gehen diese in den Belegen nach einem Erneuern verloren.
Zum Nachvollziehen: CVar von Typ Textfeld bei Waren anlegen und
in Belegen editierbar machen. Dann Beleg erstellen, Ware eingeben,
2. Zeile ansehen. Erneuern und nochmals 2. Zeile ansehen. Vor diesem
commit schrumpfte das Textfeld.

SL/CVar.pm

index c0b3f43f07944590e13f608c8e2dde05dd27b1de..cb1cd658fccfe77e7da0ecae8d035f44c0465513 100644 (file)
@@ -42,6 +42,15 @@ SQL
       } elsif ($config->{type} eq 'number') {
         $config->{precision} = $1 if ($config->{options} =~ m/precision=(\d+)/i);
 
+      } elsif ($config->{type} eq 'textfield') {
+        $config->{width}  = 30;
+        $config->{height} =  5;
+        $config->{width}  = $1 if ($config->{options} =~ m/width=(\d+)/i);
+        $config->{height} = $1 if ($config->{options} =~ m/height=(\d+)/i);
+
+      } elsif ($config->{type} eq 'text') {
+        $config->{maxlength} = $1 if ($config->{options} =~ m/maxlength=(\d+)/i);
+
       }
 
       $self->_unpack_flags($config);