projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DB-Schema-Anpassungen für »Spaltentyp Text anstelle von varchar() in diversen Tabellen«
[kivitendo-erp.git]
/
SL
/
Form.pm
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
875b726
..
9f0cf11
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-40,6
+40,7
@@
package Form;
use Carp;
use Data::Dumper;
use Carp;
use Data::Dumper;
+use Carp;
use CGI;
use Cwd;
use Encode;
use CGI;
use Cwd;
use Encode;
@@
-307,8
+308,7
@@
sub error {
$self->show_generic_error($msg);
} else {
$self->show_generic_error($msg);
} else {
- print STDERR "Error: $msg\n";
- ::end_of_request();
+ confess "Error: $msg\n";
}
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
@@
-472,7
+472,7
@@
sub header {
$layout->use_javascript("$_.js") for (qw(
jquery jquery-ui jquery.cookie jquery.checkall jquery.download
$layout->use_javascript("$_.js") for (qw(
jquery jquery-ui jquery.cookie jquery.checkall jquery.download
- jquery/jquery.form client_js
+ jquery/jquery.form
jquery/fixes
client_js
common part_selection switchmenuframe autocomplete_part
), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}");
common part_selection switchmenuframe autocomplete_part
), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}");
@@
-594,8
+594,11
@@
sub _prepare_html_template {
if (-f "templates/webpages/${file}.html") {
$file = "templates/webpages/${file}.html";
if (-f "templates/webpages/${file}.html") {
$file = "templates/webpages/${file}.html";
+ } elsif (ref $file eq 'SCALAR') {
+ # file is a scalarref, use inline mode
} else {
my $info = "Web page template '${file}' not found.\n";
} else {
my $info = "Web page template '${file}' not found.\n";
+ $::form->header;
print qq|<pre>$info</pre>|;
::end_of_request();
}
print qq|<pre>$info</pre>|;
::end_of_request();
}
@@
-695,7
+698,6
@@
sub show_generic_error {
}
if ($::request->is_ajax) {
}
if ($::request->is_ajax) {
- $::lxdebug->message(0, "trying to render AJAX response...");
SL::ClientJS->new
->error($error)
->render(SL::Controller::Base->new);
SL::ClientJS->new
->error($error)
->render(SL::Controller::Base->new);
@@
-1020,7
+1022,8
@@
sub parse_template {
file_name => $self->{IN},
form => $self,
myconfig => $myconfig,
file_name => $self->{IN},
form => $self,
myconfig => $myconfig,
- userspath => $userspath);
+ userspath => $userspath,
+ %{ $self->{TEMPLATE_DRIVER_OPTIONS} || {} });
# Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
$self->{"notes"} = $self->{ $self->{"formname"} . "notes" };
# Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
$self->{"notes"} = $self->{ $self->{"formname"} . "notes" };