From f7e012dd3df80aca0246b25526ee9e096e087fb4 Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Thu, 2 Jun 2022 18:40:09 +0200 Subject: [PATCH] form sent mode --- client/components/CookbookForm.js | 86 ++++++++++++++------- client/components/CookbookRecipes.js | 24 +++--- client/style.css | 1 + cookbook.py | 2 + static/css/style.css | 110 +++++++++++++++++++++++++++ 5 files changed, 182 insertions(+), 41 deletions(-) create mode 100644 static/css/style.css diff --git a/client/components/CookbookForm.js b/client/components/CookbookForm.js index 6ed804a..a49c362 100644 --- a/client/components/CookbookForm.js +++ b/client/components/CookbookForm.js @@ -9,6 +9,8 @@ export default { const logs = ref([""]); const who = ref(""); + const sent = ref(false); + const disabled = computed(() => { return [title, description, nature, logs, who].some((input) => input.value == ""); }); @@ -25,46 +27,72 @@ export default { who: who.value, }), }); + sent.value = true; + title.value = ""; + description.value = ""; + nature.value = ""; + logs.value = [""]; + who.value = ""; }; - return { title, description, nature, logs, who, disabled, submit }; + return { title, description, nature, logs, who, disabled, submit, sent }; }, template: ` -
-
- - -
+
-
- - -
-
- - -
+
-
- - - -
+
+ Thanks for sharing! + Your entry is being added to the cookbook. +
-
- - -
+
+ +
+ + -
- + + +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + +
+ +
+ + +
+ +
+ +
- -