Skip to content
Snippets Groups Projects
Commit 9e832671 authored by Hermann's avatar Hermann
Browse files

fix conditional spreads

parent 1d936227
No related branches found
No related tags found
No related merge requests found
...@@ -410,7 +410,7 @@ export default class newEvent extends EditView { ...@@ -410,7 +410,7 @@ export default class newEvent extends EditView {
} }
}, },
}), }),
...this.hasprice && this.form.renderSchema(['price']), ...(this.hasprice ? this.form.renderSchema(['price']) : []),
m('br'), m('br'),
m(Switch, { m(Switch, {
label: 'people have to register to attend this event', label: 'people have to register to attend this event',
...@@ -429,8 +429,8 @@ export default class newEvent extends EditView { ...@@ -429,8 +429,8 @@ export default class newEvent extends EditView {
} }
}, },
}), }),
...this.hasregistration && this.form.renderSchema([ ...(this.hasregistration ? this.form.renderSchema([
'spots', 'time_register_start', 'time_register_end']), 'spots', 'time_register_start', 'time_register_end']) : []),
this.hasregistration && this.form._renderField('add_fields_food', { this.hasregistration && this.form._renderField('add_fields_food', {
type: 'boolean', type: 'boolean',
label: 'Food Limitations', label: 'Food Limitations',
...@@ -442,7 +442,7 @@ export default class newEvent extends EditView { ...@@ -442,7 +442,7 @@ export default class newEvent extends EditView {
m('br'), m('br'),
...this.hasregistration && addFieldsText, ...(this.hasregistration ? addFieldsText : []),
m('br'), m('br'),
this.hasregistration && m(Button, { this.hasregistration && m(Button, {
label: 'Additional Textfield', label: 'Additional Textfield',
...@@ -456,7 +456,7 @@ export default class newEvent extends EditView { ...@@ -456,7 +456,7 @@ export default class newEvent extends EditView {
}, },
}), }),
m('br'), m('br'),
...this.hasregistration && this.form.renderSchema(['allow_email_signup']), ...(this.hasregistration ? this.form.renderSchema(['allow_email_signup']) : []),
this.hasregistration && radioButtonSelectionMode, this.hasregistration && radioButtonSelectionMode,
]), ]),
// PAGE 4: Internal Info // PAGE 4: Internal Info
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment