<input type="hidden" name="cs_slot_id" value="[% appointment.id %]"/>
[% disable_me = 0 %]
[% no_patron_input = 0 %]
+ [% date_started_null = 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">
<input type="hidden" name="cs_org" value="[% lib %]"/>
</span>
<span class="egtd">
- [% IF !cs_date; tmp_cs_date = date.format(date.now, '%F') %]
+ [% IF !cs_date; tmp_cs_date = date.format(date.now, '%F'); date_started_null = 1; %]
[% 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 || no_patron_input %]disabled="disabled"[% END %]/>
+ [% IF no_patron_input && date_started_null; %]
+ [% ELSE; %]<input type="date" name="cs_date" value="[% tmp_cs_date | html %]" [% IF cs_date || no_patron_input %]disabled="disabled"[% END %]/>[% 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 %]
+ [% IF date_started_null && no_patron_input %]
+ [% ELSIF appointment || ctx.cs_times.$current_date.size; # show a select %]
<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>
[% 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">
</button><br/>
[% END %]
[% ELSE %]
- [% l('Select a date') %]
+ [% IF !no_patron_input; %][% l('Select a date') %][% END %]
[% END %]
</span>
<span class="egtd">
END;
END %]
[% IF no_patron_input %]
- [% l('Please contact the library to update or cancel your appointment.') %]
+ [% l('Please contact the library to schedule, change, or cancel your appointment.') %]
[% ELSIF appointment.staged && !appointment.arrival; # relevant submit action %]
<button type="submit" name="cs_action" value="arrive" class="opac-button" [% IF disable_arrival_button %]disabled="disabled"[% END %]>
[% l('Alert staff of your arrival') %]