View | Details | Raw Unified | Return to bug 23824
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (+36 lines)
Lines 1248-1253 Link Here
1248
                                    <label for="notes">Notes:</label>
1248
                                    <label for="notes">Notes:</label>
1249
                                    <textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea>
1249
                                    <textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea>
1250
                                </li>
1250
                                </li>
1251
1252
                                [% IF (save_and_run) %]
1253
                                    <li>
1254
                                        <label for="save_and_run">Run report after saving:</label>
1255
                                        <select id="save_and_run" name="save_and_run">
1256
                                            <option value="0">No (default)</option>
1257
                                            <option value="1" selected="selected">Yes</option>
1258
                                        </select>
1259
                                    </li>
1260
                                [% ELSE %]
1261
                                    <li>
1262
                                        <label for="save_and_run">Run report after saving:</label>
1263
                                        <select id="save_and_run" name="save_and_run">
1264
                                            <option value="0" selected="selected">No (default)</option>
1265
                                            <option value="1">Yes</option>
1266
                                        </select>
1267
                                    </li>
1268
                                [% END # /IF (save_and_run) %]
1251
                            </ol>
1269
                            </ol>
1252
                        </fieldset> <!-- /.rows -->
1270
                        </fieldset> <!-- /.rows -->
1253
1271
Lines 1360-1365 Link Here
1360
                                    <label for="notes">Notes:</label>
1378
                                    <label for="notes">Notes:</label>
1361
                                    <textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea>
1379
                                    <textarea id="notes" name="notes" cols="50" rows="2">[% notes | html %]</textarea>
1362
                                </li>
1380
                                </li>
1381
1382
                                [% IF (save_and_run) %]
1383
                                    <li>
1384
                                        <label for="save_and_run">Run report after saving:</label>
1385
                                        <select id="save_and_run" name="save_and_run">
1386
                                            <option value="0">No (default)</option>
1387
                                            <option value="1" selected="selected">Yes</option>
1388
                                        </select>
1389
                                    </li>
1390
                                [% ELSE %]
1391
                                    <li>
1392
                                        <label for="save_and_run">Run report after saving:</label>
1393
                                        <select id="save_and_run" name="save_and_run">
1394
                                            <option value="0" selected="selected">No (default)</option>
1395
                                            <option value="1">Yes</option>
1396
                                        </select>
1397
                                    </li>
1398
                                [% END # /IF (save_and_run) %]
1363
                            </ol>
1399
                            </ol>
1364
                        </fieldset> <!-- /.rows -->
1400
                        </fieldset> <!-- /.rows -->
1365
1401
(-)a/reports/guided_reports.pl (-1 / +4 lines)
Lines 219-224 elsif ( $phase eq 'Update SQL'){ Link Here
219
    my $cache_expiry_units = $input->param('cache_expiry_units');
219
    my $cache_expiry_units = $input->param('cache_expiry_units');
220
    my $public = $input->param('public');
220
    my $public = $input->param('public');
221
    my $save_anyway = $input->param('save_anyway');
221
    my $save_anyway = $input->param('save_anyway');
222
    my $save_and_run = $input->param('save_and_run');
222
    my @errors;
223
    my @errors;
223
224
224
    # if we have the units, then we came from creating a report from SQL and thus need to handle converting units
225
    # if we have the units, then we came from creating a report from SQL and thus need to handle converting units
Lines 291-296 elsif ( $phase eq 'Update SQL'){ Link Here
291
                'usecache'              => $usecache,
292
                'usecache'              => $usecache,
292
            );
293
            );
293
            logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
294
            logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
295
            print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=".$id."phase=Run%20this%20report") if $save_and_run;
294
        }
296
        }
295
        if ( $usecache ) {
297
        if ( $usecache ) {
296
            $template->param(
298
            $template->param(
Lines 576-581 elsif ( $phase eq 'Save Report' ) { Link Here
576
    my $cache_expiry_units = $input->param('cache_expiry_units');
578
    my $cache_expiry_units = $input->param('cache_expiry_units');
577
    my $public = $input->param('public');
579
    my $public = $input->param('public');
578
    my $save_anyway = $input->param('save_anyway');
580
    my $save_anyway = $input->param('save_anyway');
581
    my $save_and_run = $input->param('save_and_run');
579
582
580
583
581
    # if we have the units, then we came from creating a report from SQL and thus need to handle converting units
584
    # if we have the units, then we came from creating a report from SQL and thus need to handle converting units
Lines 661-666 elsif ( $phase eq 'Save Report' ) { Link Here
661
                'public' => $public,
664
                'public' => $public,
662
                'usecache' => $usecache,
665
                'usecache' => $usecache,
663
            );
666
            );
667
            print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?reports=".$id."phase=Run%20this%20report") if $save_and_run;
664
        }
668
        }
665
    }
669
    }
666
}
670
}
667
- 

Return to bug 23824