From 1c6d38be9ccbdbda15afcdf7801ee53eff6a9af4 Mon Sep 17 00:00:00 2001 From: zackbcom Date: Tue, 5 Jan 2021 13:15:06 -0600 Subject: [PATCH] Added Quick Validation to New Theme Modal --- .../src/components/Admin/ThemeUI/NewTheme.vue | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/Admin/ThemeUI/NewTheme.vue b/frontend/src/components/Admin/ThemeUI/NewTheme.vue index 93dba2599643..760289d6c317 100644 --- a/frontend/src/components/Admin/ThemeUI/NewTheme.vue +++ b/frontend/src/components/Admin/ThemeUI/NewTheme.vue @@ -5,10 +5,18 @@ Add a New Theme - + - Create + + Cancel + + Create + @@ -19,19 +27,22 @@ export default { props: { buttonText: String, - value: String, + value: String }, data() { return { dialog: false, themeName: "", + rules: { + required: val => !!val || "Required." + } }; }, watch: { color() { this.updateColor(); - }, + } }, methods: { randomColor() { @@ -47,14 +58,14 @@ export default { success: this.randomColor(), info: this.randomColor(), warning: this.randomColor(), - error: this.randomColor(), - }, + error: this.randomColor() + } }; this.$emit("new-theme", newTheme); this.dialog = false; - }, - }, + } + } };