summaryrefslogtreecommitdiff
authorOwen Leonard <oleonard@myacpl.org>2014-10-31 16:31:46 (GMT)
committer Tomas Cohen Arazi <tomascohen@gmail.com>2014-11-06 16:50:09 (GMT)
commitbba3306d45aba8626c3ef460de06a4e76abafaf9 (patch) (side-by-side diff)
treedb867ce7c2dc7f3df694dcde5cba498b72f3c15e
parente82f6117c1d83f27a6ff10821a0b936a99c8b279 (diff)
Bug 13183 - Improve visibility of automatic on-site checkout rule when OnSiteCheckoutsForce is on
This patch addresses the case where OnSiteCheckoutsForce is enabled and the user is checking out to a patron who is blocked from checking out. Instead of showing the 'specify due date' form (which is disabled) this patch hides it and highlights the on-site checkout controls. This patch adds some CSS and consolidates some redundant CSS. To test, load a patron for checkout under the following conditions: 1. OnSiteCheckoutsForce is off and patron is not blocked from checkout 2. OnSiteCheckoutsForce is off, patron is blocked from checkout (for being expired or restricted). 3. OnSiteCheckoutsForce is on and patron is not blocked from checkout 4. OnSiteCheckoutsForce is on and patron is blocked from checkout Signed-off-by: Liz Rea <liz@catalyst.net.nz> Checked these 4 conditions, plus that if a specified due date was allowed, that it was enforced. I noted that the on-site checkouts seemed to take longer to process, but this probably isn't the place for that sort of complaint. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Small visual improvment for a new feature. No problems found. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css15
-rw-r--r--koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt50
2 files changed, 38 insertions, 27 deletions
diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index 69f5dc5..2ebb88d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -968,7 +968,8 @@ tr.highlight th[scope=row] {
margin: .2em 0;
}
-.date-select {
+.date-select,
+.onsite_checkout-select {
font-size : 85%;
padding-top : .3em;
}
@@ -2715,16 +2716,16 @@ span.browse-button {
color : #FFF;
}
-.onsite_checkout-select {
- font-size : 85%;
- font-weight: normal;
- padding-top : .3em;
-}
#circ_circulation_issue .onsite_checkout-select label,
.onsite_checkout-select label {
font-size : inherit;
font-weight: normal;
}
span.onsite_checkout {
- color: red;
+ color: #cc0000;
}
+.onsite-checkout-only {
+ background-color : rgba(255, 242, 206, 0.5);
+ border-radius: 4px;
+ border : 1px solid #FFF2CE;
+} \ No newline at end of file
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
index c2f3ba8..80b1355 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -540,29 +540,39 @@ No patron matched <span class="ex">[% message %]</span>
<label for="auto_renew">Automatic renewal</label>
</div>
- [% IF ( SpecifyDueDate ) %]<div class="date-select">
- <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
- [% IF ( duedatespec ) %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />[% ELSE %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
-[% END %]
- <label for="stickyduedate"> Remember for session:</label>
-[% IF ( stickyduedate ) %]
-<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
-[% ELSE %]
-<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
-[% END %]
- <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
-</div>[% END %]
+ [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
+ [% IF ( SpecifyDueDate ) %]
+ <div class="date-select">
+ <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
+ [% IF ( duedatespec ) %]
+ <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
+ [% ELSE %]
+ <input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
+ [% END %]
+ <label for="stickyduedate"> Remember for session:</label>
+ [% IF ( stickyduedate ) %]
+ <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
+ [% ELSE %]
+ <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
+ [% END %]
+ <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
+ </div>
+ [% END %]
+ [% END %]
- [% IF Koha.Preference('OnSiteCheckouts') %]
+ [% IF Koha.Preference('OnSiteCheckouts') %]
<div class="onsite_checkout-select">
- [% IF noissues %]
- <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkout</label>
- <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
- [% ELSE %]
- <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
- [% END %]
+ [% IF noissues %]
+ <div class="onsite-checkout-only">
+ <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
+ <input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
+ <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
+ </div>
+ [% ELSE %]
+ <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
+ [% END %]
</div>
- [% END %]
+ [% END %]
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="branch" value="[% branch %]" />