diff --git a/verse/start.py b/verse/start.py index 1634d5f..cac1ec7 100644 --- a/verse/start.py +++ b/verse/start.py @@ -73,6 +73,9 @@ def login(): if loginform.validate_on_submit(): try: user = User.query.filter_by(email=loginform.email.data).first() + if user is None: + loginform.password.errors.append("Invalid email or password!") + return render_template("login.html", loginform=loginform) if check_password_hash(user.password, loginform.password.data): login_user(user) flash("Logged in successfully.", "success") @@ -81,7 +84,7 @@ def login(): return abort(400) return redirect(next or url_for("index")) else: - flash("Invalid Username or password!", "danger") + flash("Invalid email or password!", "danger") loginform.password.errors.append("Invalid email or password!") return render_template("login.html", loginform=loginform) except Exception as e: diff --git a/verse/static/css/style.css b/verse/static/css/style.css index 140b722..44f8073 100644 --- a/verse/static/css/style.css +++ b/verse/static/css/style.css @@ -37,6 +37,7 @@ div#upload form { border: 3px solid #E0B0FF; background-color:#383C4A; text-decoration: none; + scroll-behavior: smooth; } #mainworkflow { diff --git a/verse/templates/distribusiworkflow/editcss.html b/verse/templates/distribusiworkflow/editcss.html index e3d4214..de4a2ba 100644 --- a/verse/templates/distribusiworkflow/editcss.html +++ b/verse/templates/distribusiworkflow/editcss.html @@ -1,4 +1,12 @@

(Optional) Step 3: Edit

+ {% if files_uploaded %}

Go to CSS editor

+ {% else %} +

+ You need to upload your files first before you can a css theme + for your files. +

+ Go to Step 1 + {% endif %}
diff --git a/verse/templates/distribusiworkflow/launch.html b/verse/templates/distribusiworkflow/launch.html index a13eec5..640bc06 100644 --- a/verse/templates/distribusiworkflow/launch.html +++ b/verse/templates/distribusiworkflow/launch.html @@ -4,8 +4,16 @@ your content public.

{{ distribusiform.csrf_token }} + {% if files_uploaded %}
{{ distribusiform.submit }}
+ {% else %} +

+ You need to upload your files first before you can run distribusi + on your files. +

+ Go to Step 1 + {% endif %}
diff --git a/verse/templates/distribusiworkflow/theme.html b/verse/templates/distribusiworkflow/theme.html index 99fa7d9..13f27cb 100644 --- a/verse/templates/distribusiworkflow/theme.html +++ b/verse/templates/distribusiworkflow/theme.html @@ -8,8 +8,16 @@ {{ themeform.theme.label }} {{ themeform.theme }} + {% if files_uploaded %}
{{ themeform.save }}
+ {% else %} +

+ You need to upload your files first before you can a css theme + for your files. +

+ Go to Step 1 + {% endif %} diff --git a/verse/templates/editor.html b/verse/templates/editor.html index 948dabc..f59ef2f 100644 --- a/verse/templates/editor.html +++ b/verse/templates/editor.html @@ -18,21 +18,21 @@
{% if files_uploaded %} -
- {{ editorform.cssname.label }} - {{ editorform.cssname }} - {% for message in editorform.cssname.errors %} -
{{ message }}
- {% endfor %} -
-
- {{ editorform.submit }} -
- {% else %} -

- You need to upload your files first before you can save a css file. -

- {% endif %} +
+ {{ editorform.cssname.label }} + {{ editorform.cssname }} + {% for message in editorform.cssname.errors %} +
{{ message }}
+ {% endfor %} +
+
+ {{ editorform.submit }} +
+ {% else %} +

+ You need to upload your files first before you can save a css file. +

+ {% endif %}