Bugzilla – Attachment 148616 Details for
Bug 33324
Use template wrapper for tabs: Tools
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33324: Use template wrapper for tabs: Tools
Bug-33324-Use-template-wrapper-for-tabs-Tools.patch (text/plain), 56.83 KB, created by
Owen Leonard
on 2023-03-23 16:26:17 UTC
(
hide
)
Description:
Bug 33324: Use template wrapper for tabs: Tools
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-03-23 16:26:17 UTC
Size:
56.83 KB
patch
obsolete
>From 876e6dfe5d0639fb415ba0c0614ce91de08cb188 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 23 Mar 2023 16:12:15 +0000 >Subject: [PATCH] Bug 33324: Use template wrapper for tabs: Tools > >This patch updates templates in the tools directory so that they use >the new WRAPPER directive to build tabbed navigation. > >To test, apply the patch and test each page to confirm that tabs still >work as before: > >- Cataloging -> Export > - This page by default will have two tabs, "Export bibliographic > records" and "Export authority records." You can edit koha-conf.xml > to enable two additional options: backup_db_via_tools and > backup_conf_via_tools >- Tools -> Batch patron modification > - "By card number" and "By borrowernumber," and "By patron list" if > you have any patron lists defined. >- Tools -> Overdue notice/status triggers >--- > .../prog/en/modules/tools/export.tt | 513 +++++++++--------- > .../prog/en/modules/tools/modborrowers.tt | 172 +++--- > .../prog/en/modules/tools/overduerules.tt | 176 +++--- > 3 files changed, 437 insertions(+), 424 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >index acb46b36d6..3f2a384aee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >@@ -51,263 +51,280 @@ > </div> > [% END %] > >-<div id="exporttype" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"> >- <a href="#bibs" aria-controls="bibs" role="tab" data-toggle="tab">Export bibliographic records</a> >- </li> >- <li role="presentation"> >- <a href="#auths" aria-controls="auths" role="tab" data-toggle="tab">Export authority records</a> >- </li> >+[% WRAPPER tabs id= "exporttype" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "bibs" bt_active= 1 %] <span>Export bibliographic records</span> [% END %] >+ [% WRAPPER tab_item tabname= "auths" %] <span>Export authority records</span> [% END %] > [% IF ( allow_db_export ) %] >- <li role="presentation"> >- <a href="#db" aria-controls="db" role="tab" data-toggle="tab">Export database</a> >- </li> >+ [% WRAPPER tab_item tabname= "db" %] <span>Export database</span> [% END %] > [% END %] > [% IF ( allow_conf_export ) %] >- <li role="presentation"> >- <a href="#conf" aria-controls="conf" role="tab" data-toggle="tab">Export configuration</a> >- </li> >+ [% WRAPPER tab_item tabname= "conf" %] <span>Export configuration</span> [% END %] > [% END %] >- </ul> >- <div class="tab-content"> >- <div id="bibs" role="tabpanel" class="tab-pane active"> >- <p> >- <strong>Note : The items are exported by this tool unless specified.</strong> >- </p> >- >- <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl"> >- <fieldset class="rows"> >- <legend> Select records to export </legend> >- <ol> >- <li> >- <label for="start">From biblionumber: </label> >- <input id="start" type="text" name="StartingBiblionumber" size="5" /> >- </li> >- <li> >- <label for="end">To biblionumber: </label> >- <input id="end" type="text" name="EndingBiblionumber" size="5" /> >- </li> >- >- <li> >- <label for="itemtype">Item type: </label> >- <select name="itemtype" id="itemtype" multiple> >- <option value="">-- All --</option> >- [% FOREACH itemtype IN itemtypes %] >- <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option> >- [% END %] >- </select> >- </li> >- >- <li> >- <label>With items owned by the following libraries: </label> >- [% INCLUDE 'branch-selector.inc' branches = libraries %] >- </li> >- </ol> >- >- <fieldset class="rows"> >- <legend>Call number range</legend> >- <ol> >- <li> >- <label for="startcn">From item call number: </label> >- <input id="startcn" type="text" name="start_callnumber" size="15" /> >- </li> >- <li> >- <label for="endcn">To item call number: </label> >- <input id="endcn" type="text" name="end_callnumber" size="15" /> >- </li> >- </ol> >- </fieldset> >- >- <fieldset class="rows"> >- <legend>Accession date (inclusive)</legend> >- <ol> >- <li> >- <label for="from">Start date:</label> >- <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-date_to="to" /> >- </li> >- <li> >- <label for="to">End date:</label> >- <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" /> >- </li> >- </ol> >- </fieldset> >- >- </fieldset> >- <fieldset class="rows"> >- <legend> >- Use a file >- </legend> >- <ol> >- <li>File containing a list of biblionumbers with one biblionumber per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li> >- <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend> Options</legend> >- <ol> <li> >- <label for="dont_export_item">Don't export items:</label> >- <input id="dont_export_item" type="checkbox" name="dont_export_item" /> >- </li> >- <li> >- <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label> >- <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" /> >- </li> >- <li> >- <label for="export_remove_fields">Don't export fields:</label> >- <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" /> >- separate by a blank. (e.g., 100a 200 606) >- </li></ol> >- </fieldset> >- <fieldset class="rows"> >- <legend> >- Output format >- </legend> >- <ol><li> >- <label for="output_format">File format: </label> >- <select id="output_format" name="output_format"> >- <option value="iso2709">MARC</option> >- <option value="xml">XML</option> >- [% IF csv_profiles %] >- <option value="csv">CSV</option> >+ [% END # /WRAPPER tabs_nav %] >+ >+ [% WRAPPER tab_panels %] >+ [% WRAPPER tab_panel tabname="bibs" bt_active= 1 %] >+ <p> >+ <strong>Note : The items are exported by this tool unless specified.</strong> >+ </p> >+ >+ <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl"> >+ <fieldset class="rows"> >+ <legend> Select records to export </legend> >+ <ol> >+ <li> >+ <label for="start">From biblionumber: </label> >+ <input id="start" type="text" name="StartingBiblionumber" size="5" /> >+ </li> >+ <li> >+ <label for="end">To biblionumber: </label> >+ <input id="end" type="text" name="EndingBiblionumber" size="5" /> >+ </li> >+ >+ <li> >+ <label for="itemtype">Item type: </label> >+ <select name="itemtype" id="itemtype" multiple> >+ <option value="">-- All --</option> >+ [% FOREACH itemtype IN itemtypes %] >+ <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option> >+ [% END %] >+ </select> >+ </li> >+ >+ <li> >+ <label>With items owned by the following libraries: </label> >+ [% INCLUDE 'branch-selector.inc' branches = libraries %] >+ </li> >+ </ol> >+ >+ <fieldset class="rows"> >+ <legend>Call number range</legend> >+ <ol> >+ <li> >+ <label for="startcn">From item call number: </label> >+ <input id="startcn" type="text" name="start_callnumber" size="15" /> >+ </li> >+ <li> >+ <label for="endcn">To item call number: </label> >+ <input id="endcn" type="text" name="end_callnumber" size="15" /> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend>Accession date (inclusive)</legend> >+ <ol> >+ <li> >+ <label for="from">Start date:</label> >+ <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-date_to="to" /> >+ </li> >+ <li> >+ <label for="to">End date:</label> >+ <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" /> >+ </li> >+ </ol> >+ </fieldset> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend> >+ Use a file >+ </legend> >+ <ol> >+ <li> >+ File containing a list of biblionumbers with one biblionumber per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt) >+ </li> >+ <li> >+ <label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend> Options</legend> >+ <ol> >+ <li> >+ <label for="dont_export_item">Don't export items:</label> >+ <input id="dont_export_item" type="checkbox" name="dont_export_item" /> >+ </li> >+ <li> >+ <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label> >+ <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" /> >+ </li> >+ <li> >+ <label for="export_remove_fields">Don't export fields:</label> >+ <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" /> >+ separate by a blank. (e.g., 100a 200 606) >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend> >+ Output format >+ </legend> >+ <ol> >+ <li> >+ <label for="output_format">File format: </label> >+ <select id="output_format" name="output_format"> >+ <option value="iso2709">MARC</option> >+ <option value="xml">XML</option> >+ [% IF csv_profiles %] >+ <option value="csv">CSV</option> >+ [% ELSE %] >+ <option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">CSV</option> >+ [% END %] >+ </select> >+ </li> >+ <li class="csv_profiles"> >+ <label for="bibs_csv_profile">CSV profile: </label> >+ <select id="bibs_csv_profile" name="csv_profile_id"> >+ [% FOR csv_profile IN csv_profiles %] >+ <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option> >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" /> >+ </li> >+ </ol> >+ </fieldset> >+ <input type="hidden" name="op" value="export" /> >+ <input type="hidden" name="record_type" value="bibs" /> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Export bibliographic records" /> >+ </fieldset> >+ </form> >+ [% END # /tab_panel#bibs %] >+ >+ [% WRAPPER tab_panel tabname="auths" %] >+ <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl"> >+ <fieldset class="rows"> >+ <legend> Select records to export </legend> >+ <ol> >+ <li> >+ <label for="start">From authid: </label> >+ <input id="start" type="text" name="starting_authid" size="6" /> >+ </li> >+ <li> >+ <label for="end">To authid: </label> >+ <input id="end" type="text" name="ending_authid" size="6" /> >+ </li> >+ <li> >+ <label for="authtype">Authority type: </label> >+ <select name="authtype" id="authtype"> >+ <option value="">-- All --</option> >+ [% FOREACH authority_type IN authority_types %] >+ <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option> >+ [% END %] >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend> >+ Use a file >+ </legend> >+ <ol> >+ <li> >+ File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt) >+ </li> >+ <li> >+ <label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend>Options</legend> >+ <ol> >+ <li> >+ <label for="export_remove_fields">Don't export fields:</label> >+ <input id="export_remove_fields" type="text" name="export_remove_fields" /> >+ <div class="hint">separate by a blank. (e.g., 100a 200 606)</div> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend>Output format</legend> >+ <ol> >+ <li> >+ <label for="output_format">File format: </label> >+ <select id="output_format_auth" name="output_format"> >+ <option value="marc">MARC</option> >+ <option value="xml">XML</option> >+ </select> >+ </li> >+ <li> >+ <label for="filename_auth">File name:</label> >+ <input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" /> >+ </li> >+ </ol> >+ </fieldset> >+ >+ <input type="hidden" name="op" value="export" /> >+ <input type="hidden" name="record_type" value="auths" /> >+ >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export authority records" /></fieldset> >+ </form> >+ [% END # /tab_panel#auths %] >+ >+ [% IF ( allow_db_export ) %] >+ [% WRAPPER tab_panel tabname="db" %] >+ <form method="post" class="clearfix" action="/cgi-bin/koha/tools/export.pl"> >+ <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p> >+ <fieldset class="rows"> >+ <legend> Choose a file </legend> >+ [% IF ( dbfiles && (dbfiles.size > 0) ) %] >+ <ul> >+ [% FOREACH dbfile IN dbfiles %] >+ <li><input type="radio" name="filename" value="[% dbfile | html %]" />[% dbfile | html %]</li> >+ [% END %] >+ </ul> > [% ELSE %] >- <option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">CSV</option> >- [% END %] >- </select> >- </li> >- <li class="csv_profiles"> >- <label for="bibs_csv_profile">CSV profile: </label> >- <select id="bibs_csv_profile" name="csv_profile_id"> >- [% FOR csv_profile IN csv_profiles %] >- <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option> >- [% END %] >- </select> >- </li> >- <li> >- <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" /> >- </li></ol> >- </fieldset> >- <input type="hidden" name="op" value="export" /> >- <input type="hidden" name="record_type" value="bibs" /> >- >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export bibliographic records" /></fieldset> >- </form> >- </div> >- >- <div id="auths" role="tabpanel" class="tab-pane"> >- <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl"> >- <fieldset class="rows"> >- <legend> Select records to export </legend> >- <ol><li> >- <label for="start">From authid: </label> >- <input id="start" type="text" name="starting_authid" size="6" /> >- </li> >- <li> >- <label for="end">To authid: </label> >- <input id="end" type="text" name="ending_authid" size="6" /> >- </li> >- <li> >- <label for="authtype">Authority type: </label> >- <select name="authtype" id="authtype"> >- <option value="">-- All --</option> >- [% FOREACH authority_type IN authority_types %] >- <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option> >+ <p style="clear:both">Unfortunately, no backups are available.</p> > [% END %] >- </select> >- </li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend> >- Use a file >- </legend> >- <ol> >- <li>File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li> >- <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend>Options</legend> >- <ol> >- <li> >- <label for="export_remove_fields">Don't export fields:</label> >- <input id="export_remove_fields" type="text" name="export_remove_fields" /> >- separate by a blank. (e.g., 100a 200 606) >- </li></ol> >- </fieldset> >- <fieldset class="rows"> >- <legend>Output format</legend> >- <ol><li> >- <label for="output_format">File format: </label> >- <select id="output_format_auth" name="output_format"> >- <option value="marc">MARC</option> >- <option value="xml">XML</option> >- </select> >- </li> >- <li> >- <label for="filename_auth">File name:</label><input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" /> >- </li></ol> >- </fieldset> >- <input type="hidden" name="op" value="export" /> >- <input type="hidden" name="record_type" value="auths" /> >- >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export authority records" /></fieldset> >- </form> >- </div> >+ </fieldset> > >- [% IF ( allow_db_export ) %] >- <div id="db" role="tabpanel" class="tab-pane"> >- <form method="post" action="/cgi-bin/koha/tools/export.pl"> >- <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p> >- <fieldset class="rows"> >- <legend> Choose a file </legend> >- [% IF ( dbfiles && (dbfiles.size > 0) ) %] >- <ul> >- [% FOREACH dbfile IN dbfiles %] >- <li><input type="radio" name="filename" value="[% dbfile | html %]">[% dbfile | html %]</input></li> >- [% END %] >- </ul> >- [% ELSE %] >- <p>Unfortunately, no backups are available.</p> >- [% END %] >- </fieldset> >- >- [% IF ( dbfiles && (dbfiles.size > 0) ) %] >- <input type="hidden" name="op" value="export" /> >- <input type="hidden" name="record_type" value="db" /> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download database" /></fieldset> >- [% END %] >- </form> >- </div> >- [% END %] >+ [% IF ( dbfiles && (dbfiles.size > 0) ) %] >+ <input type="hidden" name="op" value="export" /> >+ <input type="hidden" name="record_type" value="db" /> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download database" /></fieldset> >+ [% END %] >+ </form> >+ [% END # /tab_panel#db %] >+ [% END # /IF allow_db_export %] > > [% IF ( allow_conf_export ) %] >- <div id="conf" role="tabpanel" class="tab-pane"> >- <form method="post" action="/cgi-bin/koha/tools/export.pl"> >- <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p> >- <fieldset class="rows"> >- <legend> Choose a file </legend> >- [% IF ( conffiles && (conffiles.size > 0) ) %] >- <ul> >- [% FOREACH conffile IN conffiles %] >- <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li> >- [% END %] >- </ul> >- [% ELSE %] >- <p>Unfortunately, no backups are available.</p> >- [% END %] >- </fieldset> >- >- [% IF ( conffiles && (conffiles.size > 0) ) %] >- <input type="hidden" name="op" value="export" /> >- <input type="hidden" name="record_type" value="conf" /> >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download configuration" /></fieldset> >- [% END %] >- </form> >- </div> >- [% END %] >- </div> <!-- /.tab-content --> >-</div> >+ [% WRAPPER tab_panel tabname="conf" %] >+ <form method="post" class="clearfix" action="/cgi-bin/koha/tools/export.pl"> >+ <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p> >+ <fieldset class="rows"> >+ <legend> Choose a file </legend> >+ [% IF ( conffiles && (conffiles.size > 0) ) %] >+ <ul> >+ [% FOREACH conffile IN conffiles %] >+ <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li> >+ [% END %] >+ </ul> >+ [% ELSE %] >+ <p style="clear:both">Unfortunately, no backups are available.</p> >+ [% END %] >+ </fieldset> >+ >+ [% IF ( conffiles && (conffiles.size > 0) ) %] >+ <input type="hidden" name="op" value="export" /> >+ <input type="hidden" name="record_type" value="conf" /> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download configuration" /></fieldset> >+ [% END %] >+ </form> >+ [% END # /tab_panel#conf %] >+ [% END # /IF allow_conf_export %] >+ [% END # /WRAPPER tab_panels %] >+[% END # /WRAPPER tabs %] > > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index 3ba5183cd0..fdd054868a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -38,91 +38,39 @@ > <main> > > [% IF ( op == 'show_form' ) %] >- <h1>Batch patron modification</h1> >- <form id="patron_batchmod_form" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl"> >- <input type="hidden" name="op" value="show" /> >- <div id="batch_patron_options" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"> >- <a href="#usecardnumber" aria-controls="usecardnumber" role="tab" data-toggle="tab">By card number</a> >- </li> >- <li role="presentation"> >- <a href="#useborrowernumber" aria-controls="useborrowernumber" role="tab" data-toggle="tab">By borrowernumber</a> >- </li> >- [% IF patron_lists %] >- <li role="presentation"> >- <a href="#uselist" aria-controls="uselist" role="tab" data-toggle="tab">By patron list</a> >- </li> >- [% END %] >- </ul> >- <div class="tab-content"> >- <div id="usecardnumber" role="tabpanel" class="tab-pane active"> >- <fieldset class="rows"> >- <legend>Use a file of card numbers</legend> >- <ol> >- <li> >- <label for="cardnumberuploadfile">File: </label> <input type="file" >- id="cardnumberuploadfile" name="cardnumberuploadfile" /> >- <div class="hint">File must contain one card number per line.</div> >- </li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend>Or list card numbers one by one</legend> >- <ol> >- <li> >- <label for="cardnumberlist">Card number list (one card number per line): >- </label> >- <textarea rows="10" cols="30" id="cardnumberlist" >- name="cardnumberlist">[% cardnumberlist | html %]</textarea> >- </li> >- </ol> >- </fieldset> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Continue" /> >- <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> >- </fieldset> >- </div> >- <div id="useborrowernumber" role="tabpanel" class="tab-pane"> >- <fieldset class="rows"> >- <legend>Use a file of borrowernumbers</legend> >- <ol> >- <li> >- <label for="borrowernumberuploadfile">File: </label> <input type="file" >- id="borrowernumberuploadfile" name="borrowernumberuploadfile" /> >- <div class="hint">File must contain one borrowernumber per line.</div> >- </li> >- </ol> >- </fieldset> >- <fieldset class="rows"> >- <legend>List borrowernumbers one by one</legend> >- <ol> >- <li> >- <label for="borrowernumberlist">Borrowernumber list (one number per line): >- </label> >- <textarea rows="10" cols="30" id="borrowernumberlist" >- name="borrowernumberlist">[% borrowernumberlist | html %]</textarea> >- </li> >- </ol> >- </fieldset> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Continue" /> >- <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> >- </fieldset> >- </div> >- [% IF patron_lists %] >- <div id="uselist" role="tabpanel" class="tab-pane"> >+ <h1>Batch patron modification</h1> >+ <form id="patron_batchmod_form" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl"> >+ <input type="hidden" name="op" value="show" /> >+ >+ [% WRAPPER tabs id= "batch_patron_options" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "usecardnumber" bt_active= 1 %] <span>By card number</span> [% END %] >+ [% WRAPPER tab_item tabname= "useborrowernumber" %] <span>By borrowernumber</span> [% END %] >+ [% IF patron_lists %] >+ [% WRAPPER tab_item tabname= "uselist" %] <span>By patron list</span> [% END %] >+ [% END %] >+ [% END # /WRAPPER tabs_nav %] >+ >+ [% WRAPPER tab_panels %] >+ [% WRAPPER tab_panel tabname="usecardnumber" bt_active= 1 %] > <fieldset class="rows"> >- <legend>Use a patron list</legend> >+ <legend>Use a file of card numbers</legend> > <ol> > <li> >- <label for="patron_list_id">Patron list: </label> >- <select id="patron_list_id" name="patron_list_id"> >- <option value=""> -- Choose a patron list -- </option> >- [% FOREACH pl IN patron_lists %] >- <option value="[% pl.patron_list_id | html %]">[% pl.name | html %]</option> >- [% END %] >- </select> >+ <label for="cardnumberuploadfile">File: </label> <input type="file" >+ id="cardnumberuploadfile" name="cardnumberuploadfile" /> >+ <div class="hint">File must contain one card number per line.</div> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="rows"> >+ <legend>Or list card numbers one by one</legend> >+ <ol> >+ <li> >+ <label for="cardnumberlist">Card number list (one card number per line): >+ </label> >+ <textarea rows="10" cols="30" id="cardnumberlist" >+ name="cardnumberlist">[% cardnumberlist | html %]</textarea> > </li> > </ol> > </fieldset> >@@ -130,11 +78,61 @@ > <input type="submit" class="btn btn-primary" value="Continue" /> > <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> > </fieldset> >- </div> >- [% END %] >- </div> <!-- /.tab-content --> >- </div><!-- /#batch_patron_options --> >- </form> >+ [% END # /tab_panel# %] >+ >+ [% WRAPPER tab_panel tabname="useborrowernumber" %] >+ <fieldset class="rows"> >+ <legend>Use a file of borrowernumbers</legend> >+ <ol> >+ <li> >+ <label for="borrowernumberuploadfile">File: </label> <input type="file" >+ id="borrowernumberuploadfile" name="borrowernumberuploadfile" /> >+ <div class="hint">File must contain one borrowernumber per line.</div> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="rows"> >+ <legend>List borrowernumbers one by one</legend> >+ <ol> >+ <li> >+ <label for="borrowernumberlist">Borrowernumber list (one number per line): >+ </label> >+ <textarea rows="10" cols="30" id="borrowernumberlist" >+ name="borrowernumberlist">[% borrowernumberlist | html %]</textarea> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Continue" /> >+ <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> >+ </fieldset> >+ [% END # /tab_panel# %] >+ >+ [% IF patron_lists %] >+ [% WRAPPER tab_panel tabname="uselist" %] >+ <fieldset class="rows"> >+ <legend>Use a patron list</legend> >+ <ol> >+ <li> >+ <label for="patron_list_id">Patron list: </label> >+ <select id="patron_list_id" name="patron_list_id"> >+ <option value=""> -- Choose a patron list -- </option> >+ [% FOREACH pl IN patron_lists %] >+ <option value="[% pl.patron_list_id | html %]">[% pl.name | html %]</option> >+ [% END %] >+ </select> >+ </li> >+ </ol> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Continue" /> >+ <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a> >+ </fieldset> >+ [% END # /tab_panel# %] >+ [% END %] >+ [% END # /WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] >+ </form> > [% END %] > > [% IF ( op == 'show') && (!borrowers) && (!notfoundcardnumbers) # Alert if no patrons given%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt >index 377ac80fd2..18284ba858 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt >@@ -69,99 +69,98 @@ > </div> > [% END %] > [% IF ( table ) %] >- <form method="post" action="/cgi-bin/koha/tools/overduerules.pl"> >- <input type="hidden" name="op" value="save" /> >- <input type="hidden" name="branch" value="[% branch | html %]" /> >- <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3> >- [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %] >+ <form method="post" action="/cgi-bin/koha/tools/overduerules.pl"> >+ <input type="hidden" name="op" value="save" /> >+ <input type="hidden" name="branch" value="[% branch | html %]" /> >+ <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3> >+ [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %] > >- <div id="rulestabs" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- [% FOR tab IN tabs %] >- <li role="presentation"> >- <a href="#[% tab.id | uri %]" class="tab [% tab.id | html %]" data-number="[% tab.number | html %]" aria-controls="[% tab.id | uri %]" role="tab" data-toggle="tab"></a> >- </li> >- [% END %] >- </ul> >- <div class="tab-content"> >- [% FOR tab IN tabs %] >- <div id="[% tab.id | html %]" role="tabpanel" class="tab-pane"> >- <table> >- <thead> >- <tr> >- <th> </th> >- <th scope="col">Delay</th> >- <th scope="col">Letter</th> >- <th scope="col">Restrict</th> >- [% FOREACH mtt IN message_transport_types %] >- [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %] >- [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %] >- <th scope="col"> >- [% SWITCH mtt %] >- [% CASE 'email' %]<span>Email</span> >- [% CASE 'print' %]<span>[% tp('Message transport type', 'Print') | html %]</span> >- [% CASE 'sms' %]<span>SMS</span> >- [% CASE 'feed' %]<span>Feed</span> >- [% CASE 'itiva' %]<span>Phone (i-tiva)</span> >- [% CASE 'phone' %]<span>Phone</span> >- [% CASE %]<span>[% mtt | html %]</span> >- [% END %] >- </th> >- [% END %] >- </tr> >- </thead> >- <tbody> >- [% FOREACH value IN tab.values %] >+ [% WRAPPER tabs id= "rulestabs" %] >+ [% WRAPPER tabs_nav %] >+ [% FOR tab IN tabs %] >+ [% WRAPPER tab_item tabname= tab.id %][% END %] >+ [% END %] >+ [% END # /WRAPPER tabs_nav %] >+ >+ [% WRAPPER tab_panels %] >+ [% FOR tab IN tabs %] >+ [% WRAPPER tab_panel tabname=tab.id %] >+ <table> >+ <thead> > <tr> >- <th scope="row">[% value.line | html %]</th> >- <td> >- <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" /> >- </td> >- <td> >- <select name="letter[% tab.number | html %]-[% value.overduename | html %]"> >- <option value="">No notice</option> >- [% FOREACH letter IN letters %] >- [% IF letter.code == value.selected_lettercode %] >- <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option> >- [% ELSE %] >- <option value="[% letter.code | html %]">[% letter.name | html %]</option> >- [% END %] >+ <th> </th> >+ <th scope="col">Delay</th> >+ <th scope="col">Letter</th> >+ <th scope="col">Restrict</th> >+ [% FOREACH mtt IN message_transport_types %] >+ [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %] >+ [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %] >+ <th scope="col"> >+ [% SWITCH mtt %] >+ [% CASE 'email' %]<span>Email</span> >+ [% CASE 'print' %]<span>[% tp('Message transport type', 'Print') | html %]</span> >+ [% CASE 'sms' %]<span>SMS</span> >+ [% CASE 'feed' %]<span>Feed</span> >+ [% CASE 'itiva' %]<span>Phone (i-tiva)</span> >+ [% CASE 'phone' %]<span>Phone</span> >+ [% CASE %]<span>[% mtt | html %]</span> > [% END %] >- </select> >- </td> >- <td> >- [% IF ( value.debarred ) %] >- <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" /> >- [% ELSE %] >- <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" /> >- [% END %] >- </td> >- [% FOREACH mtt IN value.message_transport_types %] >- [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %] >- [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %] >+ </th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH value IN tab.values %] >+ <tr> >+ <th scope="row">[% value.line | html %]</th> > <td> >- [% IF mtt.selected %] >- <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" /> >- [% ELSE %] >- [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %] >- <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" /> >- [% ELSE %] >- <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" /> >+ <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" /> >+ </td> >+ <td> >+ <select name="letter[% tab.number | html %]-[% value.overduename | html %]"> >+ <option value="">No notice</option> >+ [% FOREACH letter IN letters %] >+ [% IF letter.code == value.selected_lettercode %] >+ <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option> >+ [% ELSE %] >+ <option value="[% letter.code | html %]">[% letter.name | html %]</option> >+ [% END %] > [% END %] >+ </select> >+ </td> >+ <td> >+ [% IF ( value.debarred ) %] >+ <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" /> >+ [% ELSE %] >+ <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" /> > [% END %] > </td> >- [% END # /FOREACH mtt %] >- </tr> >- [% END # /FOREACH value %] >- </tbody> >- </table> >- </div> <!-- /.tab-pane --> >- [% END # /FOR tabs %] >- </div> <!-- /.tab-content --> >- </div> >+ [% FOREACH mtt IN value.message_transport_types %] >+ [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %] >+ [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %] >+ <td> >+ [% IF mtt.selected %] >+ <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" /> >+ [% ELSE %] >+ [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %] >+ <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" /> >+ [% ELSE %] >+ <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" /> >+ [% END %] >+ [% END %] >+ </td> >+ [% END # /FOREACH mtt %] >+ </tr> >+ [% END # /FOREACH value %] >+ </tbody> >+ </table> >+ [% END # /tab_panel# %] >+ [% END %] >+ [% END # /WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] > >- <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save changes" /></fieldset> >- </form> >+ <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save changes" /></fieldset> >+ </form> > [% ELSE %] > <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div> > <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div> >@@ -180,15 +179,14 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] > <script> >- var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")}; >+ var tab_map = { "0" : _("First"), "1" : _("Second"), "2" : _("Third")}; > $(document).ready(function() { > $('#selectlibrary').find("input:submit").hide(); > $('#branch').change(function() { > $('#selectlibrary').submit(); > }); >- $("li>a.tab").each( function(){ >- var id = $(this).attr("data-number"); >- $(this).html(tab_map[id]); >+ $("#rulestabs li > a").each( function( i ){ >+ $(this).html(tab_map[ i ]); > }); > if( $("#rulestabs .tab-pane.active").length < 1 ){ > $("#rulestabs a:first").tab("show"); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33324
:
148616
|
148875
|
149316