Added create account page

This commit is contained in:
Sage Vaillancourt 2022-09-23 18:59:42 -04:00
parent 17494ca4df
commit c27d4e9189
2 changed files with 39 additions and 0 deletions

View File

@ -95,6 +95,11 @@ def index_get():
) )
@writing_blueprint.route('/create_account', methods=['GET'])
def index_get():
return render_template('create_account.jinja2')
@writing_blueprint.route('/dbtest', methods=['GET']) @writing_blueprint.route('/dbtest', methods=['GET'])
def db_test_get(): def db_test_get():
response = make_response(db.get_user_letters(1)[0].contents, 200) response = make_response(db.get_user_letters(1)[0].contents, 200)

View File

@ -0,0 +1,34 @@
{% extends "base.jinja2" %}
{% block title %}UnderCover - Create Account{% endblock title %}
{% block content %}
<form action="/login" method="post">
<label for="login">Username: </label>
<input id="login" maxlength="32" minlength="4" name="login" type="text" placeholder="sagev9000">
<label for="password">Password: </label>
<input id="password" maxlength="32" minlength="4" name="password" type="password">
<a href="javascript:void(0)"
class="wipe up-wipe"
{% if errors %}
onclick="/*clearErrors();*/document.getElementById('letter-form').submit()"
{% else %}
onclick="document.getElementById('letter-form').submit()"
{% endif %}
>Create Account</a>
</form>
{% if errors %}
<div id=errors>
<h3>Error while logging in:</h3>
<p class=errors>
{% for error in errors %}
{{ error }}<br>
{% endfor %}
</p>
</div>
{% endif %}
{% endblock content %}