6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Overdue notice/status triggers › Tools › Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="tools_overduerules" class="tools">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
15 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
24 <a href="#" aria-current="page">
25 Overdue notice/status triggers
31 <div class="main container-fluid">
33 <div class="col-sm-10 col-sm-push-2">
36 <h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) | html %][% ELSE %]default overdue actions[% END %]</h1>
38 <p>Delay is the number of days after a checkout is due before an action is triggered. </p>
39 <p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
40 <p>Columns must be filled left to right: if the first column is blank, other columns will be ignored. </p>
42 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl" id="selectlibrary">
43 <label for="branch">Select a library:</label>
44 <select id="branch" name="branch">
45 <option value="">Default</option>
46 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
48 <input type="submit" value="Select" />
51 <div class="dialog alert">
53 <p>The following errors were found. Please correct them and submit again:</p>
55 [% IF ( ERRORDELAY ) %]
56 <li>Delay [% ERRORDELAY | html %] for [% BORERR | html %] patron category has some unexpected characters. There should be only numerical characters. </li>
58 [% IF ( ERRORUSELESSDELAY ) %]
59 <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>
61 [% IF ( ERRORORDER ) %]
62 <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>
68 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
69 <input type="hidden" name="op" value="save" />
70 <input type="hidden" name="branch" value="[% branch | html %]" />
71 <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
72 [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
74 <div id="rulestabs" class="toptabs">
75 <ul class="nav nav-tabs" role="tablist">
77 <li role="presentation">
78 <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>
82 <div class="tab-content">
84 <div id="[% tab.id | html %]" role="tabpanel" class="tab-pane">
89 <th scope="col">Delay</th>
90 <th scope="col">Letter</th>
91 <th scope="col">Restrict</th>
92 [% FOREACH mtt IN message_transport_types %]
93 [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
94 [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %]
97 [% CASE 'email' %]<span>Email</span>
98 [% CASE 'print' %]<span>Print</span>
99 [% CASE 'sms' %]<span>SMS</span>
100 [% CASE 'feed' %]<span>Feed</span>
101 [% CASE 'itiva' %]<span>Phone (i-tiva)</span>
102 [% CASE 'phone' %]<span>Phone</span>
103 [% CASE %]<span>[% mtt | html %]</span>
110 [% FOREACH value IN tab.values %]
112 <th scope="row">[% value.line | html %]</th>
114 <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
117 <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
118 <option value="">No notice</option>
119 [% FOREACH letter IN letters %]
120 [% IF letter.code == value.selected_lettercode %]
121 <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
123 <option value="[% letter.code | html %]">[% letter.name | html %]</option>
129 [% IF ( value.debarred ) %]
130 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
132 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
135 [% FOREACH mtt IN value.message_transport_types %]
136 [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
137 [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %]
139 [% IF mtt.selected %]
140 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
142 [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
143 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
145 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
149 [% END # /FOREACH mtt %]
151 [% END # /FOREACH value %]
154 </div> <!-- /.tab-pane -->
155 [% END # /FOR tabs %]
156 </div> <!-- /.tab-content -->
159 <fieldset class="action"><input type="submit" value="Save changes" /></fieldset>
162 <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
163 <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
167 </div> <!-- /.col-sm-10.col-sm-push-2 -->
169 <div class="col-sm-2 col-sm-pull-10">
171 [% INCLUDE 'tools-menu.inc' %]
173 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
174 </div> <!-- /.row -->
176 [% MACRO jsinclude BLOCK %]
177 [% Asset.js("js/tools-menu.js") | $raw %]
179 var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
180 $(document).ready(function() {
181 $('#selectlibrary').find("input:submit").hide();
182 $('#branch').change(function() {
183 $('#selectlibrary').submit();
185 $("li>a.tab").each( function(){
186 var id = $(this).attr("data-number");
187 $(this).html(tab_map[id]);
189 if( $("#rulestabs .tab-pane.active").length < 1 ){
190 $("#rulestabs a:first").tab("show");
196 [% INCLUDE 'intranet-bottom.inc' %]