chargeperiod => undef,
chargeperiod_charge_at => undef,
issuelength => undef,
+ useDaysMode => undef,
lengthunit => undef,
hardduedate => undef,
hardduedatecompare => undef,
my $onshelfholds = $input->param('onshelfholds') || 0;
my $issuelength = $input->param('issuelength');
$issuelength = $issuelength eq q{} ? undef : $issuelength;
+ my $useDaysMode = $input->param('useDaysMode');
my $lengthunit = $input->param('lengthunit');
my $hardduedate = $input->param('hardduedate') || undef;
$hardduedate = eval { dt_from_string( $input->param('hardduedate') ) } if ( $hardduedate );
chargeperiod => $chargeperiod,
chargeperiod_charge_at => $chargeperiod_charge_at,
issuelength => $issuelength,
+ useDaysMode => $useDaysMode,
lengthunit => $lengthunit,
hardduedate => $hardduedate,
hardduedatecompare => $hardduedatecompare,
[% SET maxissueqty = all_rules.$c.$i.maxissueqty %]
[% SET maxonsiteissueqty = all_rules.$c.$i.maxonsiteissueqty %]
[% SET issuelength = all_rules.$c.$i.issuelength %]
+ [% SET useDaysMode = all_rules.$c.$i.useDaysMode %]
[% SET lengthunit = all_rules.$c.$i.lengthunit %]
[% SET hardduedate = all_rules.$c.$i.hardduedate %]
[% SET hardduedatecompare = all_rules.$c.$i.hardduedatecompare %]
[% SET article_requests = all_rules.$c.$i.article_requests %]
[% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %]
- [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %]
+ [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || useDaysMode || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %]
[% IF show_rule %]
[% SET row_count = row_count + 1 %]
<tr row_countd="row_[% row_count | html %]">
</td>
<td>[% issuelength | html %]</td>
<td>
+ [% SWITCH useDaysMode %]
+ [% CASE 'Calendar' %]<span title="Use the calendar to skip days the library is closed">Calendar</span>
+ [% CASE 'Datedue' %]<span title="Use the calendar to push the due date to the next open day">Datedue</span>
+ [% CASE 'Days' %]<span title="Ignore the calendar">Days</span>
+ [% CASE 'Dayweek' %]<span title="Use the calendar to push the due date to the next open matching weekday for weekly loan periods, or the next open day otherwise">Dayweek</span>
+ [% CASE %]<span title="Use the system preference 'useDaysMode' as a default value">Default</span>
+ [% END %]
+ <td>
[% IF ( lengthunit == 'days' ) %]
Days
[% ELSIF ( lengthunit == 'hours') %]
<td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
<td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
<td>
+ <select name="useDaysMode" id="useDaysMode">
+ <option value="">Default</option>
+ <option value="Calendar">Calendar</option>
+ <option value="Datedue">Datedue</option>
+ <option value="Days">Days</option>
+ <option value="Dayweek">Dayweek</option>
+ </select>
+ </td>
+ <td>
<select name="lengthunit" id="lengthunit">
<option value="days" selected="selected">Days</option>
<option value="hours">Hours</option>
<th>Current checkouts allowed</th>
<th>Current on-site checkouts allowed</th>
<th>Loan period</th>
+ <th>Days mode</th>
<th>Unit</th>
<th>Hard due date</th>
<th>Fine amount</th>
// specific processing for the Note column
var note = $(this).find("a[name='viewnote']").data("content");
$(current_column).find("input[type='text']").val(note);
- } else if ( i == 8 ) {
+ } else if ( i == 9 ) {
// specific processing for the Hard due date column
var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val();
var input_value = '';
}
$(current_column).find("input[type='text']").val(input_value);
$(current_column).find("select").val(select_value);
- } else if ( i == 14 ) {
+ } else if ( i == 15 ) {
// specific processing for cap_fine_to_replacement_price
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
$('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
// Remove potential previous input added
$(current_column).find("input").remove();
$(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
- } else if ( i == 4 || i == 5 || i == 24 || i == 25 || i == 26 ) {
+ } else if ( i == 5 || i == 6 || i == 25 || i == 26 || i == 27 ) {
// If the value is not an integer for
// - "Current checkouts allowed"
// - "Current on-site checkouts allowed"