Skip to content
Snippets Groups Projects
Verified Commit f4c35074 authored by Jay's avatar Jay :japanese_ogre:
Browse files

Always autofill group slug

A fellow engineer found an issue in the combined registration page,
where the group slug wouldn't update after a failed validation.

I think typically this wasn't seen, because a slug validator would
increment the slug, but on some occasions if you were faster than
the validator, you could get past it.

This small change always updates the group slug as opposed to only when
the group name is empty.

part of:
#350221

Changelog: fixed
parent 2a8c0142
No related branches found
No related tags found
1 merge request!78152Always autofill group slug
......@@ -13,11 +13,8 @@ export default class Group {
this.updateGroupPathSlugHandler = this.updateGroupPathSlug.bind(this);
this.groupNames.forEach((groupName) => {
if (groupName.value === '') {
groupName.addEventListener('keyup', this.updateHandler);
groupName.addEventListener('keyup', this.updateGroupPathSlugHandler);
}
groupName.addEventListener('keyup', this.updateHandler);
groupName.addEventListener('keyup', this.updateGroupPathSlugHandler);
});
this.groupPaths.forEach((groupPath) => {
......
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