[% PROCESS "opac/parts/header.tt2";
PROCESS "opac/parts/misc_util.tt2";
PROCESS "opac/parts/hold_status.tt2";
+ PROCESS "opac/parts/hold_notify.tt2";
PROCESS "opac/parts/myopac/column_sort_support.tt2";
WRAPPER "opac/parts/myopac/base.tt2";
myopac_page = "holds";
<th>[% l('Pickup Location') %]</th>
<th>[% l('Cancel if not filled by') %]</th>
<th>[% l('Status') %]</th>
+ <th>[% l('Notify Method') %]</th>
<th>[% l('Notes') %]</th>
<th>[% l('Edit') %]</th>
</tr>
[% PROCESS get_hold_status hold=hold; %]
</div>
</td>
+ <td>
+ <span class="sr-only">Notify Method</span>
+ <div>
+ [% PROCESS get_hold_notify h=ahr; %]
+ </div>
+ </td>
<td class="hold_notes">
<span class="sr-only">Notes</span>
[%- FOREACH pubnote IN ahr.notes;
</div>
<div class="row">
- <div class="col-12">
+ <div class="col-12 mb-3">
<strong>[% l('Status') %]</strong>: [% hold.human_status %]
</div>
<div class="col-12">
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="hold_id"
value="[% ahr.id %]" />
- [% l('Pickup library') %]
+ <div class="form-group">
+ <label for="pickup_lib">[% l('Pickup library') %]</library>
[% INCLUDE build_org_selector
- name='pickup_lib' value=ahr.pickup_lib
+ name='pickup_lib' id='pickup_lib' value=ahr.pickup_lib
can_have_vols_only=1 hold_pickup_lib=1 %]
+ </div>
</div>
- <div class="col-12">
+ <div class="col-sm-6">
[% IF hold.hold.status < 3 OR hold.hold.status == 7 %]
[%# The following actions cannot be performed on holds that
have already been captured... %]
-
- [% l('Cancel unless filled by') %]
-
+
+ <label for="expire_time">[% l('Cancel unless filled by') %]</label>
<div class="input-group date" data-provide="datepicker">
- <input type="text" class="form-control" name="expire_time" value="[% expire_time | html %]" data-date-format="mm/dd/yyyy">
+ <input type="text" class="form-control" id="expire_time" name="expire_time"
+ value="[% expire_time | html %]" data-date-format="mm/dd/yyyy">
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
-
-
- [% l('Active?') %]
-
- <select class="form-control" name="frozen">
- <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
- [% l('Yes, this hold is active now') %]
- </option>
- <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
- [% l('No, this hold is suspended') %]
- </option>
- </select>
-
- [% l('If suspended, activate on') %]
-
- <div class="input-group date" data-provide="datepicker">
+
+ <div class="form-group mt-2">
+ <label for="frozen">[% l('Active?') %]</label>
+ <select class="form-control" name="frozen" id="frozen">
+ <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
+ [% l('Yes, this hold is active now') %]
+ </option>
+ <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
+ [% l('No, this hold is suspended') %]
+ </option>
+ </select>
+ </div>
+
+ <label for="datepicker">[% l('If suspended, activate on') %]</label>
+ <div class="input-group date" data-provide="datepicker">
<input type="text" class="form-control" name="thaw_date" id="datepicker" value="[% thaw_date | html %]" data-date-format="mm/dd/yyyy">
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
+ <div class="form-check mt-3">
+ <input class="form-check-input" type="checkbox" name="email_notify" id="email_notify"
+ [% IF ahr.email_notify == 't' %] checked [% END %] />
+ <label class="form-check-label" for="email_notify">[% l('Email notification') %]</label>
+ </div>
+
+ <div class="form-group">
+ <label for="phone_notify">[% l('Phone notification - Enter phone number') %]</label>
+ <input type="text" class="form-control" name="phone_notify" id="phone_notify"
+ value="[% ahr.phone_notify | html %]" />
+ </div>
+
+ [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1%]
+ <div class="form-group">
+ <label for="sms_notify">[% l('SMS notification - Enter mobile phone number') %]</label>
+ <input onblur="check_sms_carrier(event)" type="text" class="form-control" name="sms_notify" id="sms_notify"
+ value="[% ahr.sms_notify | html %]" />
+ </div>
+ <div class="form-group">
+ <label for="sms_carrier">[% l('Mobile carrier') %]</label>
+ [% INCLUDE "opac/parts/sms_carrier_selector.tt2" ahr, sms_carrier_hide_warning="true", sms_carrier_hide_label="true" %]
+ </div>
+ [% END %]
[% END %]
--- /dev/null
+[% BLOCK get_hold_notify %]
+ [% # get hash of sms carriers keyed by id:
+ temp = ctx.search_csc('active','t');
+ tcos = { '0' => 'None' };
+ FOR o IN temp;
+ id = o.id;
+ tcos.$id = o;
+ END;
+ %]
+ [% SET any_notify = 0 %]
+ <div>
+ [% IF h.email_notify == 't' %]
+ [% any_notify = 1 %]
+ <strong>[% l("Email") %]</strong>: [% l("Yes") %]<br/>
+ [% END %]
+ [% IF h.phone_notify %]
+ [% any_notify = 1 %]
+ <strong>[% l("Phone") %]</strong>: [% h.phone_notify | html %]<br/>
+ [% END %]
+ [% IF h.sms_notify %]
+ [% any_notify = 1, cid = h.sms_carrier; %]
+ <strong>[% l("SMS") %]</strong>: [% h.sms_notify | html %] ([% tcos.$cid.name() | html %])<br/>
+ [% END %]
+ [% UNLESS any_notify %]
+ <span class="text-danger">[% l("None") %]</span>
+ [% END %]
+ </div>
+[% END %]