Bug 34478: guided_reports - run is stateless

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-02-13 08:32:50 +01:00
parent b624cc9928
commit f1ecd4eef1
No known key found for this signature in database
GPG Key ID: A085E712BEF0E0F0
2 changed files with 6 additions and 7 deletions

View File

@ -849,9 +849,8 @@
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=edit_formid=[% id | uri %]" class="btn btn-primary">Edit SQL</a>
</fieldset>
[% ELSE # IF ( auth_val_error ) %]
<form method="post" action='/cgi-bin/koha/reports/guided_reports.pl'>
<form method="get" action='/cgi-bin/koha/reports/guided_reports.pl'>
<input type='hidden' name='id' value="[% id | html %]" />
<input type='hidden' name='op' value='cud-run' />
<h1>Enter parameters for report [% name | html %]:</h1>
[% IF ( notes ) %]
<p>[% notes | html %]</p>
@ -891,7 +890,7 @@
</ol>
</fieldset> <!-- /.rows -->
<fieldset class="action">
<input type="hidden" name="op" value="cud-run" />
<input type="hidden" name="op" value="run" />
<button type="submit" class="btn btn-primary">Run the report</button>
</fieldset>
</form>
@ -1026,8 +1025,8 @@
[%- END -%]
[% END %]
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" id="limitselect">
<input type="hidden" name="op" value="cud-run"/>
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get" id="limitselect">
<input type="hidden" name="op" value="run"/>
<input type="hidden" name="reports" value="[% id | html %]"/>
[% FOREACH p IN sql_params %]
<input type="hidden" name="sql_params" value="[% p | html %]"/>

View File

@ -246,7 +246,7 @@ elsif ( $op eq 'cud-update_sql' || $op eq 'cud-update_and_run_sql' ){
);
}
if ( $op eq 'cud-update_and_run_sql' ) {
$op = 'cud-run';
$op = 'run';
}
}
}
@ -756,7 +756,7 @@ elsif ( $op eq 'add_form_sql' || $op eq 'duplicate' ) {
);
}
if ($op eq 'cud-run'){
if ($op eq 'run'){
# execute a saved report
my $limit = $input->param('limit') || 20;
my $offset = 0;