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

add two-way binding to switches in eventform

parent 5f6e7c63
No related branches found
No related tags found
No related merge requests found
...@@ -164,6 +164,7 @@ export default class newEvent extends EditView { ...@@ -164,6 +164,7 @@ export default class newEvent extends EditView {
m(Switch, { m(Switch, {
label: 'people have to pay something to attend this event', label: 'people have to pay something to attend this event',
style: { 'margin-bottom': '5px' }, style: { 'margin-bottom': '5px' },
checked: this.hasprice,
onChange: ({ checked }) => { onChange: ({ checked }) => {
this.hasprice = checked; this.hasprice = checked;
if (!checked) delete this.data.price; if (!checked) delete this.data.price;
...@@ -175,6 +176,7 @@ export default class newEvent extends EditView { ...@@ -175,6 +176,7 @@ export default class newEvent extends EditView {
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',
checked: this.hasregistration,
onChange: ({ checked }) => { onChange: ({ checked }) => {
this.hasregistration = checked; this.hasregistration = checked;
if (!checked) { if (!checked) {
......
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