To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 59bc1feb authored by Ian Boschung's avatar Ian Boschung Committed by boian
Browse files

Better signup error messages

Displays a specific error message if a signup failed because the user is
on the blacklist.
parent 7ab373d6
......@@ -186,6 +186,7 @@ export default {
updateAction: 'Anmeldung ändern',
success: 'Du hast einen Platz ergattert!',
failed: 'Anmeldung fehlgeschlagen',
blacklisted: 'Du kannst dich im Moment nicht anmelden, da du auf der Blacklist bist.',
waitingList: 'Du bist auf der Warteliste.',
accepted: 'Du bist angemeldet und hast einen Platz.',
},
......
......@@ -185,6 +185,7 @@ export default {
updateAction: 'change signup',
success: "Success! you're in",
failed: 'Signup failed',
blacklisted: 'You cannot register for this event because you are on the blacklist.',
waitingList: 'You are on the waiting list.',
accepted: 'You are signed up and got a spot.',
},
......
......@@ -77,7 +77,11 @@ export default class EventDetails {
}
} catch (err) {
log(err);
this.notification = { type: 'fail', label: i18n('events.signup.failed') };
if (err.message.includes('blacklist')) {
this.notification = { type: 'fail', label: i18n('events.signup.blacklisted') };
} else {
this.notification = { type: 'fail', label: i18n('events.signup.failed') };
}
}
this.signupBusy = false;
m.redraw();
......
Markdown is supported
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