X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCVar.pm;h=0a91c59f6438a445a28a49c75ccdfd9f88f73b9e;hb=8a40e3dd0f638557b8c666fe708ccbc1ac709c4e;hp=c0b3f43f07944590e13f608c8e2dde05dd27b1de;hpb=e74dac176e01090f7e3b6bd9e99596a36e614284;p=kivitendo-erp.git diff --git a/SL/CVar.pm b/SL/CVar.pm index c0b3f43f0..0a91c59f6 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -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); @@ -730,6 +739,8 @@ sub parse { return $::form->parse_amount(\%::myconfig, $value) if $config->{type} eq 'number'; return DateTime->from_lxoffice($value) if $config->{type} eq 'date'; return !ref $value ? SL::DB::Manager::Customer->find_by(id => $value * 1) : $value if $config->{type} eq 'customer'; + return !ref $value ? SL::DB::Manager::Vendor->find_by(id => $value * 1) : $value if $config->{type} eq 'vendor'; + return !ref $value ? SL::DB::Manager::Part->find_by(id => $value * 1) : $value if $config->{type} eq 'part'; return $value; }