LP#1879983: Don't generate a time option for null slot time
authorMike Rylander <mrylander@gmail.com>
Mon, 15 Jun 2020 16:14:59 +0000 (12:14 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 15 Jun 2020 16:22:36 +0000 (12:22 -0400)
If there is an appointment without a selected time slot, do not generate
a time option for the select dropdown based on the current time.

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

index 38c9005..24a937b 100644 (file)
@@ -75,7 +75,7 @@
             cs_slot = appointment;
             cs_slot_id = appointment.id;
             cs_date = date.format(ctx.parse_datetime(appointment.slot),'%F');
-            cs_time = date.format(ctx.parse_datetime(appointment.slot),'%T');
+            IF appointment.slot; cs_time = date.format(ctx.parse_datetime(appointment.slot),'%T'); END;
             cs_notes = appointment.notes;
         END %]
         <form class="egtr" method="POST">