Is it possible in Enterprise to have an url only for edit page. Once I save not to go back to edit page ?
I want to use this as a settings page for my project.
Is it possible in Enterprise to have an url only for edit page. Once I save not to go back to edit page ?
I want to use this as a settings page for my project.
Not sure if this is the way … but one workaround that I found was to open directly the edit page as: …/admin/settings/edit/1
After which in view to add:
<script>
window.addEventListener('gcrud.form.update', ({detail}) => {
window.location.assign("<?= site_url('admin/settings/edit/1') ?>");
});
window.addEventListener('gcrud.form.modal-close', ({detail}) => {
window.location.assign("<?= site_url('admin/settings/edit/1') ?>");
});
</script>
In controller I’ve added:
$crud->columns(['id']);
$crud->unsetColumns(['id']);
$crud->unsetAdd();
$crud->unsetDelete();
$crud->unsetTools();
$crud->unsetDatagridTitle();
I’m left with the pagination area that I’ll hide it from CSS.
For me for the moment it does the job, but if anyone has a better way please share.
Regards