diff --git a/src/views/admin/SettingsView.vue b/src/views/admin/SettingsView.vue index 2fcc47f8..54648e50 100644 --- a/src/views/admin/SettingsView.vue +++ b/src/views/admin/SettingsView.vue @@ -130,7 +130,8 @@ > mdi-trash-can-outline - {{ $t('pages.settings.deleteTest') }} + + {{ $t('pages.settings.deleteTest') }} @@ -237,7 +238,7 @@ export default { if (this.test) return `Are you sure you want to delete your test "${this.test.testTitle}"? This action can't be undone.` - return 'Are you sure you want to delete this test? This action can\'t be undone' //in case object isnt loaded + return "Are you sure you want to delete this test? This action can't be undone" //in case object isnt loaded }, hasTemplate() { if (this.object) @@ -430,15 +431,18 @@ export default { header: tempHeader, body: tempBody, }) - - await this.$store.dispatch('createTemplate', template) - this.closeDialog() + if (this.template.templateTitle.trim() !== '') { + await this.$store.dispatch('createTemplate', template) + this.closeDialog() + }else{ + this.$refs.tempform.validate() + } }, closeDialog() { this.tempDialog = false this.$refs.tempform.resetValidation() - this.templateTitle = '' - this.templateDescription = '' + this.template.templateTitle = '' + this.template.templateDescription = '' }, setLeavingAlert() { this.$store.commit('SET_DIALOG_LEAVE', true)