diff options
-rw-r--r-- | public/js/modules/event-edit.js | 2 | ||||
-rwxr-xr-x | views/partials/eventForm.handlebars | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/public/js/modules/event-edit.js b/public/js/modules/event-edit.js index 0a295cb..ad3f2c5 100644 --- a/public/js/modules/event-edit.js +++ b/public/js/modules/event-edit.js @@ -49,7 +49,7 @@ function editEventForm() { this.data.timezone = this.select2.val(); // Set checkboxes - this.data.eventGroupCheckbox = window.eventData.eventGroupID !== ""; + this.data.eventGroupCheckbox = !!window.eventData.eventGroupID; this.data.interactionCheckbox = window.eventData.usersCanComment; this.data.joinCheckbox = window.eventData.usersCanAttend; this.data.maxAttendeesCheckbox = diff --git a/views/partials/eventForm.handlebars b/views/partials/eventForm.handlebars index 852a3a3..97e25af 100755 --- a/views/partials/eventForm.handlebars +++ b/views/partials/eventForm.handlebars @@ -95,8 +95,12 @@ </select> </div> <a class="card shadow-sm card--group-preview mb-3" x-show="showGroupPreview()" x-bind:href="groupPreview().url" target="_blank"> - <img :src="'/events/' + groupPreview().image" x-show="groupPreview().image"/> - <img src="/images/seigaiha-single.png" x-show="!groupPreview().image"/> + <template x-if="groupPreview().image"> + <img :src="'/events/' + groupPreview().image"/> + </template> + <template x-if="!groupPreview().image"> + <img src="/images/seigaiha-single.png"/> + </template> <div class="card--group-preview__text"> <strong x-text="groupPreview().name"></strong> <p x-text="groupPreview().description"></p> |