Commit caed397b authored by maspect's avatar maspect
Browse files

Add a button to change the Priority of an event to high

parent 6542d84e
......@@ -37,9 +37,7 @@ export default class newEvent extends EditView {
console.log(data);
this.form.data = data;
}
if (!this.form.data.priority) this.form.data.priority = 1;
if (this.form.data.priority === 10) this.form.data.high_priority = true;
// read additional_fields to make it editable
if (this.form.data.additional_fields) {
......@@ -131,6 +129,13 @@ export default class newEvent extends EditView {
this.form.data.additional_fields = null;
}
if (this.form.data.high_priority === true) {
this.form.data.priority = 10;
} else {git
this.form.data.priority = 1;
}
delete this.form.data.high_priority;
// if spots is not set, also remove 'allow_email_signup'
if (!('spots' in this.form.data) && 'allow_email_signup' in this.form.data
&& !this.form.data.allow_email_signup) {
......@@ -372,6 +377,8 @@ export default class newEvent extends EditView {
type: 'boolean',
label: 'SBB Abonnement',
}),
m('br'),
...this.hasregistration && addFieldsText,
m('br'),
......@@ -407,12 +414,20 @@ export default class newEvent extends EditView {
// onChange: ({ value }) => { this.data.priority = value; },
}),
*/
...this.form.renderSchema(['show_website', 'show_announce', 'show_infoscreen']),
// pritority update
this.form._renderField('high_priority', {
type: 'boolean',
label: 'Set high Priority',
}),
m('div', 'Please send your announce text additionally via email to info@amiv.ch ' +
'until the new announce tool is ready.'),
m('div', 'Please send an email to info@amiv.ch in order to show your event on' +
'the infoscreen until the new infoscreen tool is ready.'),
]),
// page 5: images
m('div', {
style: { display: (this.currentpage === 5) ? 'block' : 'none' },
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment