From 1ec1f428f47b8fee89b0606d6b644041b9fc35d6 Mon Sep 17 00:00:00 2001 From: mazino ukah Date: Sun, 3 May 2020 23:39:31 +0100 Subject: [PATCH] Skip modal to create record --- frontend/js/components/TitleEditor.vue | 11 ++- .../modals/ModalValidationButtons.vue | 3 +- frontend/js/store/modules/form.js | 7 +- frontend/js/store/modules/publication.js | 4 + .../Controllers/Admin/ModuleController.php | 74 +++++++++++++++++-- views/layouts/form.blade.php | 3 + views/layouts/listing.blade.php | 11 ++- 7 files changed, 102 insertions(+), 11 deletions(-) diff --git a/frontend/js/components/TitleEditor.vue b/frontend/js/components/TitleEditor.vue index cd14dfa43..482146ff5 100755 --- a/frontend/js/components/TitleEditor.vue +++ b/frontend/js/components/TitleEditor.vue @@ -7,9 +7,10 @@ {{ customTitle ? customTitle : title }} - + {{ visibleUrl | prettierUrl }} + {{ visibleUrl | prettierUrl }} @@ -51,6 +52,10 @@ type: String, default: 'Missing title' }, + showModal: { + type: Boolean, + default: false + }, name: { default: 'title' }, @@ -72,6 +77,9 @@ disabled: false } }, + mounted: function () { + this.showModal && this.$refs.editModal.open() + }, computed: { titleEditorClasses: function () { return { @@ -79,6 +87,7 @@ } }, mode: function () { + if (this.showModal) return 'done' return this.title.length > 0 ? 'update' : 'create' }, fullUrl: function () { diff --git a/frontend/js/components/modals/ModalValidationButtons.vue b/frontend/js/components/modals/ModalValidationButtons.vue index d9a46d0ab..42f05496d 100644 --- a/frontend/js/components/modals/ModalValidationButtons.vue +++ b/frontend/js/components/modals/ModalValidationButtons.vue @@ -5,7 +5,8 @@ {{ $trans('modal.create.button', 'Create') }} {{ $trans('modal.create.create-another', 'Create and add another') }} - {{ $trans('modal.update.button', 'Update') }} + {{ $trans('modal.update.button', 'Update') }} + {{ $trans('modal.done.button', 'Done') }}