Skip to content

Commit

Permalink
Adding the cancel method. Using more generic "save" button text
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 14, 2017
1 parent 5ba2585 commit 88ef97c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Modules/Page/Assets/js/components/PageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

<el-form-item>
<el-button type="primary" @click="onSubmit()" :loading="loading">
{{ translate('core', 'button.create') }}
{{ translate('core', 'save') }}
</el-button>
<el-button @click="onCancel()">{{ translate('core', 'button.cancel') }}</el-button>
</el-form-item>
Expand Down Expand Up @@ -189,6 +189,9 @@
});
});
},
onCancel() {
window.location = route('admin.page.page.index');
},
fetchTemplates() {
axios.get(route('api.page.page-templates.index'))
.then(response => {
Expand Down
5 changes: 4 additions & 1 deletion public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -69965,6 +69965,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
});
});
},
onCancel: function onCancel() {
window.location = route('admin.page.page.index');
},
fetchTemplates: function fetchTemplates() {
var _this2 = this;

Expand Down Expand Up @@ -70268,7 +70271,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
_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: {
"click": function($event) {
_vm.onCancel()
Expand Down

0 comments on commit 88ef97c

Please sign in to comment.