Browse Source

Bug 10860 [QA Followup] - Fix misc issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
3.18.x
Kyle Hall 8 years ago
committed by Tomas Cohen Arazi
parent
commit
33d285599f
  1. 5
      C4/Circulation.pm
  2. 10
      koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js
  3. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
  4. 13
      koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
  5. 2
      t/db_dependent/Circulation.t

5
C4/Circulation.pm

@ -1189,11 +1189,10 @@ AddIssue does the following things :
sub AddIssue {
my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
my $onsite_checkout = $params->{onsite_checkout};
my $auto_renew = $params->{auto_renew};
my $onsite_checkout = $params && $params->{onsite_checkout} ? 1 : 0;
my $auto_renew = $params && $params->{auto_renew};
my $dbh = C4::Context->dbh;
my $barcodecheck=CheckValidBarcode($barcode);
$onsite_checkout = ( $onsite_checkout ? 1 : 0 );
if ($datedue && ref $datedue ne 'DateTime') {
$datedue = dt_from_string($datedue);

10
koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js

@ -307,11 +307,11 @@ $(document).ready(function() {
span_class = "renewals-allowed";
}
content += "<span class='" + span_class + "' style='" + span_style + "'>"
+ "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
+ "</span>";
if ( oObj.renewals_remaining && oObj.onsite_checkout == 0 ) {
content += "<span class='" + span_class + "' style='" + span_style + "'>"
+ "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
+ "</span>";
if ( oObj.renewals_remaining && onsite_checkout == 0 ) {
content += "<span class='renewals'>("
+ RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
+ ")</span>";
@ -444,7 +444,7 @@ $(document).ready(function() {
var onsite_checkout = '';
if ( oObj.onsite_checkout == 1 ) {
onsite_checkout += " <span class='onsite_checkout'>("+INHOUSE_USE+")</span>";
onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
}
title += " "

2
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

@ -549,7 +549,7 @@ No patron matched <span class="ex">[% message %]</span>
<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 %]
[% IF onsite_checkout_feature %]
[% IF Koha.Preference('On-site checkouts') %]
<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>

13
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt

@ -17,11 +17,11 @@
]
}));
var tabs = $("#tabs").tabs({
select: function(e, ui) {
var id = $(ui.tab).attr("id");
if ( id == "tab_checkout" ) {
table.fnFilter("checkout", 0);
} else if ( id == "tab_onsite_checkout" ) {
activate: function(e, ui) {
var active = tabs.tabs("option", "active" );
if ( active == 1 ) {
table.fnFilter("standard_checkout", 0);
} else if ( active == 2 ) {
table.fnFilter("onsite_checkout", 0);
} else { // all
table.fnFilter('', 0);
@ -82,7 +82,7 @@
[% IF issue.onsite_checkout %]
onsite_checkout
[% ELSE %]
checkout
standard_checkout
[% END %]
</td>
<td>
@ -105,7 +105,6 @@
<td>
<span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
</td>
<td>[% issue.issuedate | $KohaDates %]</td>
<td>[% issue.issuingbranch %]</td>
<td>
[% IF issue.date_due %]

2
t/db_dependent/Circulation.t

@ -338,7 +338,7 @@ C4::Context->dbh->do("DELETE FROM accountlines");
$biblionumber
);
AddIssue( $renewing_borrower, $barcode4, undef, undef, undef, undef, 1 );
AddIssue( $renewing_borrower, $barcode4, undef, undef, undef, undef, { auto_renew => 1 } );
( $renewokay, $error ) =
CanBookBeRenewed( $renewing_borrowernumber, $itemnumber4 );
is( $renewokay, 0, 'Cannot renew, renewal is automatic' );

Loading…
Cancel
Save