Skip to content

Commit c06e208

Browse files
feat: allows to publish event only when event has relevant info
1 parent 125f26b commit c06e208

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

app/templates/components/forms/wizard/basic-details-step.hbs

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{input type='text' id='name' value=data.event.name}}
55
</div>
66
<div class="field">
7-
<label for="location">{{t 'Location'}}</label>
7+
<label class="required" for="location">{{t 'Location'}}</label>
88
{{#widgets/forms/location-input
99
inputId='location'
1010
lat=data.event.latitude
@@ -143,13 +143,17 @@
143143
</div>
144144
{{#if data.module.ticketInclude}}
145145
<div class="ui section divider"></div>
146-
<div class="field">
147-
<div class="ui slider checkbox">
148-
{{input type='checkbox' checked=data.event.isTicketingEnabled id='use_ticketing_system'}}
149-
<label for="use_ticketing_system">{{t 'Use ticketing system'}}</label>
146+
{{!-- Hiding toggle ticket feature temporarily
147+
<div class="field">
148+
<div class="ui slider checkbox">
149+
{{input type='checkbox' checked=data.event.isTicketingEnabled id='use_ticketing_system'}}
150+
<label for="use_ticketing_system">{{t 'Use ticketing system'}}</label>
151+
</div>
150152
</div>
151-
</div>
152-
{{#if data.event.isTicketingEnabled}}
153+
--}}
154+
<div class="field">
155+
<label class="required">{{t 'Ticketing System'}}</label>
156+
{{!-- {{#if data.event.isTicketingEnabled}} --}}
153157
<div class="ui attached segment {{unless data.event.tickets 'center aligned'}}">
154158
{{#if data.event.tickets}}
155159
<div class="ui stackable celled five column grid ticket-header">
@@ -179,7 +183,7 @@
179183
{{/each}}
180184
{{else}}
181185
<h3 class="text muted weight-500">
182-
{{t 'You don\'t have any tickets added. Add one of your choice.'}}
186+
{{t 'You don\'t have any tickets added. Please add atleast one ticket to publish your event.'}}
183187
</h3>
184188
{{/if}}
185189
</div>
@@ -197,14 +201,15 @@
197201
</i>
198202
{{t 'Paid Ticket'}}
199203
</button>
200-
{{else}}
201-
<div class="field">
202-
<label for="ticket_url">{{t 'Ticket URL'}}</label>
203-
{{widgets/forms/link-input inputId='ticket_url' segmentedLink=data.event.segmentedTicketUrl}}
204-
</div>
205-
{{/if}}
204+
{{!-- {{else}}
205+
<div class="field">
206+
<label for="ticket_url">{{t 'Ticket URL'}}</label>
207+
{{widgets/forms/link-input inputId='ticket_url' segmentedLink=data.event.segmentedTicketUrl}}
208+
</div>
209+
{{/if}} --}}
210+
</div>
206211
{{/if}}
207-
{{#if (and hasPaidTickets data.event.isTicketingEnabled)}}
212+
{{#if hasPaidTickets}}
208213
{{!-- Hiding discount code temporarily, till we get this feature ready to apply discount codes for events.
209214
<div class="ui section divider"></div>
210215
<div class="field">
@@ -571,7 +576,7 @@
571576
<i class="save icon"></i>
572577
</button>
573578
{{/if}}
574-
{{#if data.event.locationName}}
579+
{{#if (and data.event.locationName data.event.tickets.length)}}
575580
<button class="green ui three field right labeled icon button {{if isLoading 'disabled'}}" type="button" {{action 'publish'}}>
576581
{{t 'Publish'}}
577582
<i class="check icon"></i>

app/templates/components/forms/wizard/sessions-speakers-step.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
{{t 'Save draft'}}
325325
<i class="save icon"></i>
326326
</button>
327-
{{#if data.event.locationName}}
327+
{{#if (and data.event.locationName data.event.tickets.length)}}
328328
<button class="green ui three field right labeled icon button {{if isLoading 'disabled'}}" type="button" {{action 'publish'}}>
329329
{{t 'Publish'}}
330330
<i class="check icon"></i>

app/templates/components/forms/wizard/sponsors-step.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
{{t 'Save draft'}}
8686
<i class="save icon"></i>
8787
</button>
88-
{{#if data.event.locationName}}
88+
{{#if (and data.event.locationName data.event.tickets.length)}}
8989
<button class="green ui three field right labeled icon button {{if isLoading 'disabled'}}" type="button" {{action 'publish'}}>
9090
{{t 'Publish'}}
9191
<i class="check icon"></i>

0 commit comments

Comments
 (0)