Bug 33966: (bug 23824 follow-up) Fix submit buttons for translated templates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrii Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-06-09 15:35:41 +02:00 committed by Tomas Cohen Arazi
parent 8040370e78
commit a8c6c134d8
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 4 additions and 4 deletions

View file

@ -1360,8 +1360,8 @@
</fieldset>
<fieldset class="action">
<input type="submit" name="phase" class="btn btn-primary" value="Update SQL" />
<input type="submit" name="phase" class="btn btn-primary" value="Update and run SQL" />
<button class="btn btn-primary" type="submit" name="phase" value="update_sql">Update SQL</button>
<button class="btn btn-default" type="submit" name="phase" value="update_and_run_sql">Update and run SQL</button>
<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved" class="cancel">Cancel</a>
</fieldset>
</form>

View file

@ -209,7 +209,7 @@ elsif ( $phase eq 'Edit SQL'){
);
}
elsif ( $phase eq 'Update SQL' || $phase eq 'Update and run SQL' ){
elsif ( $phase eq 'update_sql' || $phase eq 'update_and_run_sql' ){
my $id = $input->param('id');
my $sql = $input->param('sql');
my $reportname = $input->param('reportname');
@ -301,7 +301,7 @@ elsif ( $phase eq 'Update SQL' || $phase eq 'Update and run SQL' ){
cache_expiry_units => $cache_expiry_units,
);
}
if ( $phase eq 'Update and run SQL' ) {
if ( $phase eq 'update_and_run_sql' ) {
print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=$id&phase=Run%20this%20report");
}
}