From ce0b141325ae657c5217506b95a3141cda8ea207 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 11 Sep 2022 12:04:21 +0200 Subject: [PATCH] specify the type of color code we want --- files/routes/settings.py | 8 ++++---- files/templates/settings_profile.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 8e2b29245..c6c72d70e 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -315,7 +315,7 @@ def namecolor(v): if color.startswith('#'): color = color[1:] if not color_regex.fullmatch(color): - return render_template("settings_profile.html", v=v, error="Invalid color code") + return render_template("settings_profile.html", v=v, error="Invalid color hex code") v.namecolor = color g.db.add(v) @@ -331,7 +331,7 @@ def themecolor(v): if themecolor.startswith('#'): themecolor = themecolor[1:] if not color_regex.fullmatch(themecolor): - return render_template("settings_profile.html", v=v, error="Invalid color code") + return render_template("settings_profile.html", v=v, error="Invalid color hex code") v.themecolor = themecolor g.db.add(v) @@ -384,7 +384,7 @@ def titlecolor(v): if titlecolor.startswith('#'): titlecolor = titlecolor[1:] if not color_regex.fullmatch(titlecolor): - return render_template("settings_profile.html", v=v, error="Invalid color code") + return render_template("settings_profile.html", v=v, error="Invalid color hex code") v.titlecolor = titlecolor g.db.add(v) return redirect("/settings/profile") @@ -396,7 +396,7 @@ def titlecolor(v): def verifiedcolor(v): verifiedcolor = str(request.values.get("verifiedcolor", "")).strip() if verifiedcolor.startswith('#'): verifiedcolor = verifiedcolor[1:] - if len(verifiedcolor) != 6: return render_template("settings_profile.html", v=v, error="Invalid color code") + if len(verifiedcolor) != 6: return render_template("settings_profile.html", v=v, error="Invalid color hex code") v.verifiedcolor = verifiedcolor g.db.add(v) return redirect("/settings/profile") diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 90fe2987e..5bc8cc877 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -168,7 +168,7 @@ -

Or type a color code:

+

Or type a color hex code:

@@ -451,7 +451,7 @@
-

Or type a color code:

+

Or type a color hex code:

@@ -528,7 +528,7 @@ -

Or type a color code:

+

Or type a color hex code:

@@ -571,7 +571,7 @@
-

Or type a color code:

+

Or type a color hex code: