From 2fc8536bc22603efd89e90b0207f118126ea969f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 15 Nov 2012 17:42:16 +0100 Subject: [PATCH] =?utf8?q?Dialogbuchungen=20am=20selben=20Tag=20komplett?= =?utf8?q?=20bearbeiten=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Natürlich nur, sofern es in der Konfiguration auch an ist. Macht die Felder bearbeitbar, wenn die Buttons zum Löschen/Buchen angezeigt werden; damit wird die Maske wieder konsistent. Fixt #1942. --- bin/mozilla/gl.pl | 11 ++++++----- templates/webpages/gl/form_header.html | 12 ++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 719f22209..bc5d7a56c 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -844,6 +844,10 @@ sub display_rows { } +sub _get_radieren { + return ($::instance_conf->get_gl_changeable == 2) ? ($::form->current_date(\%::myconfig) eq $::form->{gldate}) : ($::instance_conf->get_gl_changeable == 1); +} + sub form_header { $::lxdebug->enter_sub; $::auth->assert('general_ledger'); @@ -886,6 +890,7 @@ sub form_header { $::form->header; print $::form->parse_html_template('gl/form_header', { hide_title => $title, + readonly => $::form->{id} && ($::form->{locked} || !_get_radieren()), }); $::lxdebug->leave_sub; @@ -903,12 +908,8 @@ sub form_footer { $follow_ups_due = sum map { $_->{due} * 1 } @{ $follow_ups || [] }; } - my $radieren = ($::instance_conf->get_gl_changeable == 2) - ? ($::form->current_date(\%::myconfig) eq $::form->{gldate}) - : ($::instance_conf->get_gl_changeable == 1); - print $::form->parse_html_template('gl/form_footer', { - radieren => $radieren, + radieren => _get_radieren(), follow_ups => $follow_ups, follow_ups_due => $follow_ups_due, }); diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html index 448b8a33f..728c80fc7 100644 --- a/templates/webpages/gl/form_header.html +++ b/templates/webpages/gl/form_header.html @@ -62,12 +62,12 @@ [% 'Reference' | $T8 %] - [% L.input_tag('reference', reference, size=20, readonly=id) %] + [% L.input_tag('reference', reference, size=20, readonly=readonly) %] - +
[% 'Date' | $T8 %][% L.date_tag('transdate', transdate, readonly=id) %][% L.date_tag('transdate', transdate, readonly=readonly) %]
@@ -75,12 +75,12 @@ [%- IF id %] [% 'Belegnummer' | $T8 %] - [% L.input_tag('id', id, size=20, readonly=id) %] + [% L.input_tag('id', id, size=20, readonly=readonly) %] - +
[% 'Buchungsdatum' | $T8 %][% L.date_tag('gldate', gldate, readonly=id) %][% L.date_tag('gldate', gldate, readonly=1) %]
@@ -97,7 +97,7 @@ [% 'Description' | $T8 %] - [% L.areainput_tag('description', description, cols=50, readonly=id) %] + [% L.areainput_tag('description', description, cols=50, readonly=readonly) %] @@ -111,7 +111,7 @@
- +
[% 'Mitarbeiter' | $T8 %][% L.input_tag('employee', employee, size=20, readonly=id) %][% L.input_tag('employee', employee, size=20, readonly=readonly) %]
-- 2.20.1