'integer'
);
+INSERT INTO config.org_unit_setting_type (name, label, grp, description, datatype)
+VALUES (
+ 'circ.curbside.disable_patron_input',
+ 'When enabled, patrons cannot use the My Account interface to select curbside pickup times',
+ 'circ',
+ 'When enabled, patrons cannot use the My Account interface to select curbside pickup times',
+ 'bool'
+);
+
INSERT INTO actor.org_unit_setting (org_unit, name, value)
SELECT id, 'circ.curbside', 'false' FROM actor.org_unit WHERE parent_ou IS NULL
UNION
<input type="hidden" name="action" value="curbside"/>
<input type="hidden" name="cs_slot_id" value="[% appointment.id %]"/>
[% disable_me = 0 %]
+ [% no_patron_input = 0 %]
[% IF appointment && appointment.arrival; disable_me = 1; END %]
+ [% IF ctx.get_org_setting(lib, 'circ.curbside.disable_patron_input'); no_patron_input = 1; END %]
<span class="egtd">
- [% ctx.get_aou(lib).name | html %]
+ [% ctx.get_aou(lib).name | html %]<br/>
+ [% l('Phone:')%] [% ctx.get_aou(lib).phone | html %]
<input type="hidden" name="cs_org" value="[% lib %]"/>
</span>
<span class="egtd">
[% IF !cs_date; tmp_cs_date = date.format(date.now, '%F') %]
[% ELSE; tmp_cs_date = cs_date; END %]
[% IF cs_date %]<input type="hidden" name="cs_date" value="[% cs_date | html %]"/>[% END %]
- <input type="date" name="cs_date" value="[% tmp_cs_date | html %]" [% IF cs_date %]disabled="disabled"[% END %]/>
+ <input type="date" name="cs_date" value="[% tmp_cs_date | html %]" [% IF cs_date || no_patron_input %]disabled="disabled"[% END %]/>
</span>
<span class="egtd">
[% IF appointment || cs_date; # checking times %]
[% current_date = cs_date %]
[% IF appointment || ctx.cs_times.$current_date.size; # show a select %]
- <select name="cs_time" [% IF disable_me %]disabled="disabled"[% END %]>
+ <select name="cs_time" [% IF disable_me || no_patron_input %]disabled="disabled"[% END %]>
[% found_time = 0 %]
[% FOR t IN ctx.cs_times.$current_date %]
<option value="[% t.0 | html %]"
</option>
[% END %]
</select>
+ [% ELSIF no_patron_input %]
+ [% l('Please contact the library to select a date.') %]
[% ELSE %]
[% l('No times available') %]
<button type="submit" name="cs_action" value="reset" class="opac-button">
</span>
<span class="egtd">
[% IF cs_date; # show the notes box %]
- <input type="text" name="cs_notes" value="[% cs_notes | html %]" [% IF disable_me %]disabled="disabled"[% END %]/>
+ <input type="text" name="cs_notes" value="[% cs_notes | html %]" [% IF no_patron_input || disable_me %]disabled="disabled"[% END %]/>
[% ELSE %]
[% END %]
</span>
<span class="egtd">
- [% IF appointment.staged && !appointment.arrival; # relevant submit action %]
+ [% IF no_patron_input %]
+ [% l('Please contact the library to update or cancel your appointment.') %]
+ [% ELSIF appointment.staged && !appointment.arrival; # relevant submit action %]
<button type="submit" name="cs_action" value="arrive" class="opac-button">
[% l('Alert staff of your arrival') %]
</button><br/>