Adding the cancel method. Using more generic "save" button text

parent 5ba25853
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit()" :loading="loading"> <el-button type="primary" @click="onSubmit()" :loading="loading">
{{ translate('core', 'button.create') }} {{ translate('core', 'save') }}
</el-button> </el-button>
<el-button @click="onCancel()">{{ translate('core', 'button.cancel') }}</el-button> <el-button @click="onCancel()">{{ translate('core', 'button.cancel') }}</el-button>
</el-form-item> </el-form-item>
...@@ -189,6 +189,9 @@ ...@@ -189,6 +189,9 @@
}); });
}); });
}, },
onCancel() {
window.location = route('admin.page.page.index');
},
fetchTemplates() { fetchTemplates() {
axios.get(route('api.page.page-templates.index')) axios.get(route('api.page.page-templates.index'))
.then(response => { .then(response => {
......
...@@ -69965,6 +69965,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); ...@@ -69965,6 +69965,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
}); });
}); });
}, },
onCancel: function onCancel() {
window.location = route('admin.page.page.index');
},
fetchTemplates: function fetchTemplates() { fetchTemplates: function fetchTemplates() {
var _this2 = this; var _this2 = this;
...@@ -70268,7 +70271,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c ...@@ -70268,7 +70271,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
_vm.onSubmit() _vm.onSubmit()
} }
} }
}, [_vm._v("\n " + _vm._s(_vm.translate('core', 'button.create')) + "\n ")]), _vm._v(" "), _c('el-button', { }, [_vm._v("\n " + _vm._s(_vm.translate('core', 'save')) + "\n ")]), _vm._v(" "), _c('el-button', {
on: { on: {
"click": function($event) { "click": function($event) {
_vm.onCancel() _vm.onCancel()
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