X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/14d5612bd71957448bb5a6325cb8650d84e7dd54..4bed72f:/SL/Form.pm?ds=inline diff --git a/SL/Form.pm b/SL/Form.pm index 4d26c2552..141233d94 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -471,14 +471,12 @@ sub header { jquery.multiselect2side frame_header/header ui-lightness/jquery-ui jquery-ui.custom - js/jscalendar/calendar-win2k-1 ); - $layout->use_javascript("$_.js") for qw( - jquery common jscalendar/calendar jscalendar/lang/calendar-de - jscalendar/calendar-setup part_selection jquery-ui jquery.cookie jqModal jquery.checkall - switchmenuframe - ); + $layout->use_javascript("$_.js") for (qw( + jquery jquery-ui jquery.cookie jqModal jquery.checkall + common part_selection switchmenuframe + ), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}"); $self->{favicon} ||= "favicon.ico"; $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title} || !$self->{titlebar}; @@ -706,6 +704,14 @@ sub show_generic_error { return; } + if ($::request->is_ajax) { + $::lxdebug->message(0, "trying to render AJAX response..."); + SL::ClientJS->new + ->error($error) + ->render(SL::Controller::Base->new); + ::end_of_request(); + } + my $add_params = { 'title_error' => $params{title}, 'label_error' => $error, @@ -925,6 +931,11 @@ sub parse_amount { my ($self, $myconfig, $amount) = @_; + if (!defined($amount) || ($amount eq '')) { + $main::lxdebug->leave_sub(2); + return 0; + } + if ( ($myconfig->{numberformat} eq '1.000,00') || ($myconfig->{numberformat} eq '1000,00')) { $amount =~ s/\.//g;