6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Tools › Overdue notice/status triggers</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="tools_overduerules" class="tools">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
15 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Overdue notice/status triggers</div>
17 <div class="main container-fluid">
19 <div class="col-sm-10 col-sm-push-2">
22 <h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) | html %][% ELSE %]default overdue actions[% END %]</h1>
24 <p>Delay is the number of days after a checkout is due before an action is triggered. </p>
25 <p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
26 <p>Columns must be filled left to right: if the first column is blank, other columns will be ignored. </p>
28 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl" id="selectlibrary">
29 <label for="branch">Select a library:</label>
30 <select id="branch" name="branch">
31 <option value="">Default</option>
32 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
34 <input type="submit" value="Select" />
37 <div class="dialog alert">
39 <p>The following errors were found. Please correct them and submit again:</p>
41 [% IF ( ERRORDELAY ) %]
42 <li>Delay [% ERRORDELAY | html %] for [% BORERR | html %] patron category has some unexpected characters. There should be only numerical characters. </li>
44 [% IF ( ERRORUSELESSDELAY ) %]
45 <li>No letter or restriction action specified for delay [% ERRORUSELESSDELAY | html %] for [% BORERR | html %] patron category. If a delay is supplied, either a letter, restrict action, or both should be specified.</li>
47 [% IF ( ERRORORDER ) %]
48 <li>The first notice's delay should be less than the second, which should be less than the third for the <strong>[% BORERR | html %]</strong> patron category </li>
54 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
55 <input type="hidden" name="op" value="save" />
56 <input type="hidden" name="branch" value="[% branch | html %]" />
57 <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
58 [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
60 <div id="rulestabs" class="toptabs">
61 <ul class="ui-tabs-nav">
63 <li><a href="#[% tab.id | uri %]" class="tab [% tab.id | html %]" data-number="[% tab.number | html %]"></a></li>
67 <div id="[% tab.id | html %]">
72 <th scope="col">Delay</th>
73 <th scope="col">Letter</th>
74 <th scope="col">Restrict</th>
75 [% FOREACH mtt IN message_transport_types %]
96 [% FOREACH value IN tab.values %]
98 <th scope="row">[% value.line | html %]</th>
100 <input type="number" min="1" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
103 <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
104 <option value="">No notice</option>
105 [% FOREACH letter IN letters %]
106 [% IF letter.code == value.selected_lettercode %]
107 <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
109 <option value="[% letter.code | html %]">[% letter.name | html %]</option>
115 [% IF ( value.debarred ) %]
116 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
118 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
121 [% FOREACH mtt IN value.message_transport_types %]
123 [% IF mtt.selected %]
124 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
126 [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
127 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
128 [% ELSIF mtt.value == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
129 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
131 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
146 <fieldset class="action"><input type="submit" value="Save changes" /></fieldset>
149 <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
150 <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
154 </div> <!-- /.col-sm-10.col-sm-push-2 -->
156 <div class="col-sm-2 col-sm-pull-10">
158 [% INCLUDE 'tools-menu.inc' %]
160 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
161 </div> <!-- /.row -->
163 [% MACRO jsinclude BLOCK %]
164 [% Asset.js("js/tools-menu.js") | $raw %]
166 var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
167 $(document).ready(function() {
168 $('#selectlibrary').find("input:submit").hide();
169 $('#branch').change(function() {
170 $('#selectlibrary').submit();
172 $("li>a.tab").each( function(){
173 var id = $(this).attr("data-number");
174 $(this).html(tab_map[id]);
176 $('#rulestabs').tabs();
181 [% INCLUDE 'intranet-bottom.inc' %]