LP#1879983: Don't use the input parameter to set the default date
authorMike Rylander <mrylander@gmail.com>
Tue, 16 Jun 2020 16:20:56 +0000 (12:20 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 16 Jun 2020 16:20:56 +0000 (12:20 -0400)
If there is an appointment without a selected time slot, do not
preselect the current date as if this were the second step in the
process.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/opac/myopac/holds_curbside.tt2

index 24a937b..f0c8952 100644 (file)
@@ -74,7 +74,7 @@
         IF appointment;
             cs_slot = appointment;
             cs_slot_id = appointment.id;
-            cs_date = date.format(ctx.parse_datetime(appointment.slot),'%F');
+            IF appointment.slot; cs_date = date.format(ctx.parse_datetime(appointment.slot),'%F'); END;
             IF appointment.slot; cs_time = date.format(ctx.parse_datetime(appointment.slot),'%T'); END;
             cs_notes = appointment.notes;
         END %]