X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Famcvar.pl;h=343350a242de0151da1c0d795c9178cd93cc0418;hb=493457086f727b713cca06c25c1c3bedb92185af;hp=fc4f26f14f941e9043e067596a93b3ccb79dbbff;hpb=de0f9532013c861dae78aa01b9633284d1ceee7c;p=kivitendo-erp.git diff --git a/bin/mozilla/amcvar.pl b/bin/mozilla/amcvar.pl index fc4f26f14..343350a24 100644 --- a/bin/mozilla/amcvar.pl +++ b/bin/mozilla/amcvar.pl @@ -54,11 +54,15 @@ our %translations = ('text' => $locale->text('Free-form text'), 'timestamp' => $locale->text('Timestamp'), 'bool' => $locale->text('Yes/No (Checkbox)'), 'select' => $locale->text('Selection'), + 'customer' => $locale->text('Customer'), + 'vendor' => $locale->text('Vendor'), + 'part' => $locale->text('Part'), ); -our @types = qw(text textfield number date bool select); # timestamp +our @types = qw(text textfield number date bool select customer vendor part); # timestamp our @modules = ({ module => 'CT', description => $locale->text('Customers and vendors') }, + { module => 'Contacts', description => $locale->text('Contact persons') }, { module => 'IC', description => $locale->text('Parts, services and assemblies') }, { module => 'Projects', description => $locale->text('Projects') }, ); @@ -210,11 +214,27 @@ sub display_cvar_config_form { $main::lxdebug->leave_sub(); } +sub update { + $main::lxdebug->enter_sub(); + + my $form = $main::form; + + $main::auth->assert('config'); + + $form->{included_by_default} = $form->{inclusion} eq 'yes_default_on'; + $form->{includeable} = $form->{inclusion} ne 'no'; + + display_cvar_config_form(); + + $main::lxdebug->leave_sub(); +} + + sub dispatcher { my $form = $main::form; my $locale = $main::locale; - foreach my $action (qw(list_cvar_configs add_cvar_config)) { + foreach my $action (qw(list_cvar_configs add_cvar_config update)) { if ($form->{"action_${action}"}) { call_sub($action); return; @@ -225,3 +245,4 @@ sub dispatcher { } 1; +