From: Steve Sutton Date: Thu, 29 Mar 2018 19:32:36 +0000 (-0400) Subject: Update the add event page for notice of no times. X-Git-Tag: v1.6.78^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e9b611102b4b7e7868f962b743db84d6ade25e4b;p=WP-Plugins%2Fglm-member-db-events.git Update the add event page for notice of no times. Show this notice only when they have no times (update) --- diff --git a/models/admin/events/list.php b/models/admin/events/list.php index 5cfd116..fcedeaf 100644 --- a/models/admin/events/list.php +++ b/models/admin/events/list.php @@ -126,6 +126,7 @@ class GlmMembersAdmin_events_list extends GlmDataEvents $numbRecurrences = 0; $times = false; $haveTimes = false; + $newEvent = false; $timesCount = 0; $firstTime = false; $lastTime = false; @@ -256,6 +257,9 @@ class GlmMembersAdmin_events_list extends GlmDataEvents case 'add': $event = $this->newEntry(); + // Assume the event has times. + // This will be true if they do not goto the dates tab. + $newEvent = true; $view = 'edit'; @@ -991,6 +995,7 @@ class GlmMembersAdmin_events_list extends GlmDataEvents 'newRecurrence' => $newRecurrence, 'times' => $times, 'haveTimes' => $haveTimes, + 'newEvent' => $newEvent, 'timesCount' => $timesCount, 'firstTime' => $firstTime, 'lastTime' => $lastTime, diff --git a/views/admin/events/edit.html b/views/admin/events/edit.html index b918b19..1964a09 100644 --- a/views/admin/events/edit.html +++ b/views/admin/events/edit.html @@ -42,7 +42,7 @@ {if $eventUpdateError || $eventAddError}

NOTICE: Your event has not yet been submitted.
Please select the tabs indicating a problem, correct the indicated fields and resubmit.

{else} - {if !$haveTimes} + {if !$haveTimes && !$newEvent}

NOTICE: Your event does not have any selected dates/times. Please check your schedule in the "Dates" tab below.

{/if} {/if} @@ -77,7 +77,6 @@ Location Dates Summary Calendar - Attach Files