From: Moritz Bunkus Date: Thu, 15 Nov 2012 16:42:16 +0000 (+0100) Subject: Dialogbuchungen am selben Tag komplett bearbeiten können X-Git-Tag: release-3.0.0beta2~12^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2fc8536bc22603efd89e90b0207f118126ea969f;p=kivitendo-erp.git Dialogbuchungen am selben Tag komplett bearbeiten können 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. --- 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) %]