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 id="doc3" class="yui-t2">
23 <h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) | html %][% ELSE %]default overdue actions[% END %]</h1>
25 <p>Delay is the number of days after a checkout is due before an action is triggered. </p>
26 <p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
27 <p>Columns must be filled left to right: if the first column is blank, other columns will be ignored. </p>
29 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl" id="selectlibrary">
30 <label for="branch">Select a library:</label>
31 <select id="branch" name="branch">
32 <option value="">Default</option>
33 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
35 <input type="submit" value="Select" />
38 <div class="dialog alert">
40 <p>The following errors were found. Please correct them and submit again:</p>
42 [% IF ( ERRORDELAY ) %]
43 <li>Delay [% ERRORDELAY | html %] for [% BORERR | html %] patron category has some unexpected characters. There should be only numerical characters. </li>
45 [% IF ( ERRORUSELESSDELAY ) %]
46 <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>
48 [% IF ( ERRORORDER ) %]
49 <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>
55 <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
56 <input type="hidden" name="op" value="save" />
57 <input type="hidden" name="branch" value="[% branch | html %]" />
58 <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
59 [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
61 <div id="rulestabs" class="toptabs">
62 <ul class="ui-tabs-nav">
64 <li><a href="#[% tab.id | html %]" class="tab [% tab.id | html %]" data-number="[% tab.number | html %]"></a></li>
68 <div id="[% tab.id | html %]">
73 <th scope="col">Delay</th>
74 <th scope="col">Letter</th>
75 <th scope="col">Restrict</th>
76 [% FOREACH mtt IN message_transport_types %]
97 [% FOREACH value IN tab.values %]
99 <th scope="row">[% value.line | html %]</th>
101 <input type="number" min="1" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
104 <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
105 <option value="">No notice</option>
106 [% FOREACH letter IN letters %]
107 [% IF letter.code == value.selected_lettercode %]
108 <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
110 <option value="[% letter.code | html %]">[% letter.name | html %]</option>
116 [% IF ( value.debarred ) %]
117 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
119 <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
122 [% FOREACH mtt IN value.message_transport_types %]
124 [% IF mtt.selected %]
125 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
127 [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
128 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
129 [% ELSIF mtt.value == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
130 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
132 <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
147 <fieldset class="action"><input type="submit" value="Save changes" /></fieldset>
150 <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
151 <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
155 <div class="yui-b noprint">
156 [% INCLUDE 'tools-menu.inc' %]
160 [% MACRO jsinclude BLOCK %]
161 [% Asset.js("js/tools-menu.js") | $raw %]
162 <script type="text/javascript">
163 var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
164 $(document).ready(function() {
165 $('#selectlibrary').find("input:submit").hide();
166 $('#branch').change(function() {
167 $('#selectlibrary').submit();
169 $("li>a.tab").each( function(){
170 var id = $(this).attr("data-number");
171 $(this).html(tab_map[id]);
173 $('#rulestabs').tabs();
178 [% INCLUDE 'intranet-bottom.inc' %]