5 [% PROCESS 'i18n.inc' %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Overdue notice/status triggers › Tools › Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="tools_overduerules" class="tools">
13 [% WRAPPER 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
17 [% WRAPPER 'sub-header.inc' %]
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
24 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
27 <a href="#" aria-current="page">
28 Overdue notice/status triggers
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
40 <h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) | html %][% ELSE %]default overdue actions[% END %]</h1>
42 <p>Delay is the number of days after a checkout is due before an action is triggered. </p>
43 <p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
44 <p>Columns must be filled left to right: if the first column is blank, other columns will be ignored. </p>
46 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl" id="selectlibrary">
47 <label for="branch">Select a library:</label>
48 <select id="branch" name="branch">
49 <option value="">Default</option>
50 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
52 <input type="submit" value="Select" />
55 <div class="dialog alert">
57 <p>The following errors were found. Please correct them and submit again:</p>
59 [% IF ( ERRORDELAY ) %]
60 <li>Delay [% ERRORDELAY | html %] for [% BORERR | html %] patron category has some unexpected characters. There should be only numerical characters. </li>
62 [% IF ( ERRORUSELESSDELAY ) %]
63 <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>
65 [% IF ( ERRORORDER ) %]
66 <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>
72 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
73 <input type="hidden" name="op" value="save" />
74 <input type="hidden" name="branch" value="[% branch | html %]" />
75 <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
76 [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
78 <div id="rulestabs" class="toptabs">
79 <ul class="nav nav-tabs" role="tablist">
81 <li role="presentation">
82 <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>
86 <div class="tab-content">
88 <div id="[% tab.id | html %]" role="tabpanel" class="tab-pane">
93 <th scope="col">Delay</th>
94 <th scope="col">Letter</th>
95 <th scope="col">Restrict</th>
96 [% FOREACH mtt IN message_transport_types %]
97 [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
98 [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %]
101 [% CASE 'email' %]<span>Email</span>
102 [% CASE 'print' %]<span>[% tp('Message transport type', 'Print') | html %]</span>
103 [% CASE 'sms' %]<span>SMS</span>
104 [% CASE 'feed' %]<span>Feed</span>
105 [% CASE 'itiva' %]<span>Phone (i-tiva)</span>
106 [% CASE 'phone' %]<span>Phone</span>
107 [% CASE %]<span>[% mtt | html %]</span>
114 [% FOREACH value IN tab.values %]
116 <th scope="row">[% value.line | html %]</th>
118 <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
121 <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
122 <option value="">No notice</option>
123 [% FOREACH letter IN letters %]
124 [% IF letter.code == value.selected_lettercode %]
125 <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
127 <option value="[% letter.code | html %]">[% letter.name | html %]</option>
133 [% IF ( value.debarred ) %]
134 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
136 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
139 [% FOREACH mtt IN value.message_transport_types %]
140 [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
141 [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %]
143 [% IF mtt.selected %]
144 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
146 [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
147 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
149 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
153 [% END # /FOREACH mtt %]
155 [% END # /FOREACH value %]
158 </div> <!-- /.tab-pane -->
159 [% END # /FOR tabs %]
160 </div> <!-- /.tab-content -->
163 <fieldset class="action"><input type="submit" value="Save changes" /></fieldset>
166 <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
167 <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
171 </div> <!-- /.col-sm-10.col-sm-push-2 -->
173 <div class="col-sm-2 col-sm-pull-10">
175 [% INCLUDE 'tools-menu.inc' %]
177 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
178 </div> <!-- /.row -->
180 [% MACRO jsinclude BLOCK %]
181 [% Asset.js("js/tools-menu.js") | $raw %]
183 var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
184 $(document).ready(function() {
185 $('#selectlibrary').find("input:submit").hide();
186 $('#branch').change(function() {
187 $('#selectlibrary').submit();
189 $("li>a.tab").each( function(){
190 var id = $(this).attr("data-number");
191 $(this).html(tab_map[id]);
193 if( $("#rulestabs .tab-pane.active").length < 1 ){
194 $("#rulestabs a:first").tab("show");
200 [% INCLUDE 'intranet-bottom.inc' %]