__PACKAGE__->run_before('check_auth');
-my %allowed_modules = map { $_ => "bin/mozilla/$_.pl" } qw(is ir ar ap);
+my %allowed_modules = map { $_ => "bin/mozilla/$_.pl" } qw(is ir ar ap gl);
#
# actions
require $allowed_modules{ $self->draft->module };
}
+
+ my $params = delete $::form->{form};
my $new_form = YAML::Load($self->draft->form);
$::form->{$_} = $new_form->{$_} for keys %$new_form;
$::form->{"draft_$_"} = $self->draft->$_ for qw(id description);
+ if ($params && 'HASH' eq ref $params) {
+ $::form->{$_} = $params->{$_} for keys %$params;
+ }
+
$::form->{script} = $self->draft->module . '.pl';
::update();
}