FIX: Wizard locale change wasn't applying to some elements (#12915)
This commit is contained in:
parent
c1517e428e
commit
7b5f31ff04
|
@ -1,4 +1,6 @@
|
||||||
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
wizard: null,
|
wizard: null,
|
||||||
step: null,
|
step: null,
|
||||||
|
@ -7,7 +9,12 @@ export default Controller.extend({
|
||||||
goNext(response) {
|
goNext(response) {
|
||||||
const next = this.get("step.next");
|
const next = this.get("step.next");
|
||||||
if (response.refresh_required) {
|
if (response.refresh_required) {
|
||||||
this.send("refresh");
|
if (this.get("step.id") === "locale") {
|
||||||
|
document.location = getUrl(`/wizard/steps/${next}`);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.send("refresh");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.transitionToRoute("step", next);
|
this.transitionToRoute("step", next);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue