diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-03-18 16:57:31 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-03-18 16:57:31 +0000 |
| commit | a3184c5d142848b5147811ed246e39545e978805 (patch) | |
| tree | c3b1d0e87dcbc2c8aad3ed531c81f9bc4117a992 /app/templates | |
| parent | use bootstrap (diff) | |
| download | AnnotateChange-a3184c5d142848b5147811ed246e39545e978805.tar.gz AnnotateChange-a3184c5d142848b5147811ed246e39545e978805.zip | |
refactor
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/auth/login.html | 16 | ||||
| -rw-r--r-- | app/templates/auth/register.html (renamed from app/templates/register.html) | 0 | ||||
| -rw-r--r-- | app/templates/auth/reset_password.html (renamed from app/templates/reset_password.html) | 0 | ||||
| -rw-r--r-- | app/templates/auth/reset_password_request.html (renamed from app/templates/reset_password_request.html) | 0 | ||||
| -rw-r--r-- | app/templates/base.html | 8 | ||||
| -rw-r--r-- | app/templates/email/reset_password.html | 2 | ||||
| -rw-r--r-- | app/templates/email/reset_password.txt | 2 | ||||
| -rw-r--r-- | app/templates/errors/404.html (renamed from app/templates/404.html) | 2 | ||||
| -rw-r--r-- | app/templates/errors/500.html (renamed from app/templates/500.html) | 2 | ||||
| -rw-r--r-- | app/templates/login.html | 29 |
10 files changed, 24 insertions, 37 deletions
diff --git a/app/templates/auth/login.html b/app/templates/auth/login.html new file mode 100644 index 0000000..27268b2 --- /dev/null +++ b/app/templates/auth/login.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% import 'bootstrap/wtf.html' as wtf %} + +{% block app_content %} +<h1>Sign In</h1> +<div class="row"> + <div class="col-md-4"> + {{ wtf.quick_form(form) }} + </div> +</div> +<p>New User? <a href="{{ url_for('auth.register') }}">Click to Register!</a></p> +<p> +Forgot your password? +<a href="{{ url_for('auth.reset_password_request') }}">Click here to reset it</a> +</p> +{% endblock %} diff --git a/app/templates/register.html b/app/templates/auth/register.html index c430b38..c430b38 100644 --- a/app/templates/register.html +++ b/app/templates/auth/register.html diff --git a/app/templates/reset_password.html b/app/templates/auth/reset_password.html index cab00c9..cab00c9 100644 --- a/app/templates/reset_password.html +++ b/app/templates/auth/reset_password.html diff --git a/app/templates/reset_password_request.html b/app/templates/auth/reset_password_request.html index c516141..c516141 100644 --- a/app/templates/reset_password_request.html +++ b/app/templates/auth/reset_password_request.html diff --git a/app/templates/base.html b/app/templates/base.html index ee03e3d..8e51695 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -14,17 +14,17 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="{{ url_for('index') }}">AnnotateChange</a> + <a class="navbar-brand" href="{{ url_for('main.index') }}">AnnotateChange</a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> - <li><a href="{{ url_for('index') }}">Home</a></li> + <li><a href="{{ url_for('main.index') }}">Home</a></li> </ul> <ul class="nav navbar-nav navbar-right"> {% if current_user.is_anonymous %} - <li><a href="{{ url_for('login') }}">Login</a></li> + <li><a href="{{ url_for('auth.login') }}">Login</a></li> {% else %} - <li><a href="{{ url_for('logout') }}">Logout</a></li> + <li><a href="{{ url_for('auth.logout') }}">Logout</a></li> {% endif %} </ul> </div> diff --git a/app/templates/email/reset_password.html b/app/templates/email/reset_password.html index f7403a5..5ce604d 100644 --- a/app/templates/email/reset_password.html +++ b/app/templates/email/reset_password.html @@ -1,7 +1,7 @@ <p>Dear {{ user.username }},</p> <p> To reset your password - <a href="{{ url_for('reset_password', token=token, _external=True) }}"> + <a href="{{ url_for('auth.reset_password', token=token, _external=True) }}"> click here </a>. </p> diff --git a/app/templates/email/reset_password.txt b/app/templates/email/reset_password.txt index da1330f..0f7b0e7 100644 --- a/app/templates/email/reset_password.txt +++ b/app/templates/email/reset_password.txt @@ -2,7 +2,7 @@ Dear {{ user.username }}, To reset your password click on the following link: -{{ url_for('reset_password', token=token, _external=True) }} +{{ url_for('auth.reset_password', token=token, _external=True) }} If you have not requested a password reset then you can simply ignore this email. diff --git a/app/templates/404.html b/app/templates/errors/404.html index 51295c4..80f5bd6 100644 --- a/app/templates/404.html +++ b/app/templates/errors/404.html @@ -2,5 +2,5 @@ {% block app_content %} <h1>Page Not Found</h1> - <p><a href="{{ url_for('index') }}">Home</p> + <p><a href="{{ url_for('main.index') }}">Home</p> {% endblock %} diff --git a/app/templates/500.html b/app/templates/errors/500.html index adda72b..5297e6a 100644 --- a/app/templates/500.html +++ b/app/templates/errors/500.html @@ -3,5 +3,5 @@ {% block app_content %} <h1>An unexpected error has occurred</h1> <p>The administrator has been notified, apologies for the inconvenience.</p> - <p><a href="{{ url_for('index') }}">Home</p> + <p><a href="{{ url_for('main.index') }}">Home</p> {% endblock %} diff --git a/app/templates/login.html b/app/templates/login.html deleted file mode 100644 index 9b862f6..0000000 --- a/app/templates/login.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "base.html" %} - -{% block app_content %} - <h1>Sign In</h1> - <form action="" method="post" novalidate> - {{ form.hidden_tag() }} - <p> - {{ form.username.label }}<br> - {{ form.username(size=32) }} - {% for error in form.username.errors %} - <span style="color: red;">[{{ error }}]</span> - {% endfor %} - </p> - <p> - {{ form.password.label }}<br> - {{ form.password(size=32) }} - {% for error in form.username.errors %} - <span style="color: red;">[{{ error }}]</span> - {% endfor %} - </p> - <p>{{ form.remember_me() }} {{ form.remember_me.label }}</p> - <p>{{ form.submit() }}</p> - </form> - <p>New User? <a href="{{ url_for('register') }}">Click to Register!</a></p> - <p> - Forgot your password? - <a href="{{ url_for('reset_password_request') }}">Click here to reset it</a> - </p> -{% endblock %} |
