UX: Replace route when users try to access invalid group management page.
https://meta.discourse.org/t/unable-to-save-changes-to-a-group/84954
This commit is contained in:
parent
f40f10240c
commit
9176b2591d
|
@ -0,0 +1,5 @@
|
|||
export default Discourse.Route.extend({
|
||||
titleToken() {
|
||||
return I18n.t('groups.manage.interaction.title');
|
||||
},
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
export default Discourse.Route.extend({
|
||||
titleToken() {
|
||||
return I18n.t('groups.manage.membership.title');
|
||||
},
|
||||
|
||||
afterModel(group) {
|
||||
if (group.get('automatic')) {
|
||||
this.replaceWith("group.manage.interaction", group);
|
||||
}
|
||||
},
|
||||
});
|
|
@ -3,7 +3,9 @@ export default Discourse.Route.extend({
|
|||
return I18n.t('groups.manage.profile.title');
|
||||
},
|
||||
|
||||
model() {
|
||||
return this.modelFor('group');
|
||||
afterModel(group) {
|
||||
if (group.get('automatic')) {
|
||||
this.replaceWith("group.manage.interaction", group);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue