Browse Source

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>
3.18.x
Owen Leonard 8 years ago
committed by Tomas Cohen Arazi
parent
commit
bba3306d45
  1. 15
      koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
  2. 50
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

15
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;
}

50
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 %]" />

Loading…
Cancel
Save