diff --git a/client/client/src/address/edit/index.html b/client/client/src/address/edit/index.html
index 40a932dc4..5f926aaec 100644
--- a/client/client/src/address/edit/index.html
+++ b/client/client/src/address/edit/index.html
@@ -102,5 +102,6 @@
+
diff --git a/client/client/src/address/edit/index.js b/client/client/src/address/edit/index.js
index 5a55d78d8..377235ff6 100644
--- a/client/client/src/address/edit/index.js
+++ b/client/client/src/address/edit/index.js
@@ -12,6 +12,16 @@ export default class Controller {
this.$.model.remove(index);
}
+ cancel(event) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ this.goToIndex();
+ }
+
+ goToIndex() {
+ this.$state.go('client.card.address.index');
+ }
+
submit() {
this.$.watcher.check();
this.$.watcher.realSubmit()
@@ -20,7 +30,7 @@ export default class Controller {
this.$.watcher.setPristine();
this.$.watcher.notifySaved();
this.card.reload();
- this.$state.go('client.card.address.index', {id: this.$stateParams.id});
+ this.goToIndex();
});
}
}
diff --git a/client/client/src/credit/create/index.html b/client/client/src/credit/create/index.html
index 5602e6432..f19b0b734 100644
--- a/client/client/src/credit/create/index.html
+++ b/client/client/src/credit/create/index.html
@@ -14,6 +14,7 @@
+
{
- this.$state.go('client.card.credit.index');
+ this.goToIndex();
}
);
}
diff --git a/client/client/src/recovery/create/index.html b/client/client/src/recovery/create/index.html
index dcdf01bfa..c145bc72e 100644
--- a/client/client/src/recovery/create/index.html
+++ b/client/client/src/recovery/create/index.html
@@ -38,5 +38,6 @@
+
diff --git a/client/client/src/recovery/create/index.js b/client/client/src/recovery/create/index.js
index 002f0e2aa..06d9296cd 100644
--- a/client/client/src/recovery/create/index.js
+++ b/client/client/src/recovery/create/index.js
@@ -8,11 +8,22 @@ class Controller {
started: new Date()
};
}
+
+ cancel(event) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ this.goToIndex();
+ }
+
+ goToIndex() {
+ this.$state.go('client.card.recovery.index');
+ }
+
onSubmit() {
this.recovery.clientFk = this.$state.params.id;
this.$.watcher.submit().then(
() => {
- this.$state.go('client.card.recovery.index');
+ this.goToIndex();
}
);
}