aboutsummaryrefslogtreecommitdiff
path: root/wqflask/flask_security/templates/security
diff options
context:
space:
mode:
authorLei Yan2013-06-25 21:50:53 +0000
committerLei Yan2013-06-25 21:50:53 +0000
commit54ce9aec126d8d642755c709e0d6b3dc50a91d29 (patch)
treeb3df8f299215e26fd95137367955d5dbe5d8868c /wqflask/flask_security/templates/security
parent615b861dfd05c04df2e1a753dd135b07c1d88a94 (diff)
parenta0a1d8b70e02871328fb044c7ae190f805b0a04e (diff)
downloadgenenetwork2-54ce9aec126d8d642755c709e0d6b3dc50a91d29.tar.gz
Merge git://github.com/zsloan/genenetwork into flask
Diffstat (limited to 'wqflask/flask_security/templates/security')
-rw-r--r--wqflask/flask_security/templates/security/.DS_Storebin0 -> 6148 bytes
-rw-r--r--wqflask/flask_security/templates/security/_macros.html16
-rw-r--r--wqflask/flask_security/templates/security/_menu.html15
-rw-r--r--wqflask/flask_security/templates/security/_messages.html9
-rw-r--r--wqflask/flask_security/templates/security/change_password.html11
-rw-r--r--wqflask/flask_security/templates/security/email/change_notice.html4
-rw-r--r--wqflask/flask_security/templates/security/email/change_notice.txt5
-rw-r--r--wqflask/flask_security/templates/security/email/confirmation_instructions.html3
-rw-r--r--wqflask/flask_security/templates/security/email/confirmation_instructions.txt3
-rw-r--r--wqflask/flask_security/templates/security/email/login_instructions.html5
-rw-r--r--wqflask/flask_security/templates/security/email/login_instructions.txt5
-rw-r--r--wqflask/flask_security/templates/security/email/reset_instructions.html1
-rw-r--r--wqflask/flask_security/templates/security/email/reset_instructions.txt3
-rw-r--r--wqflask/flask_security/templates/security/email/reset_notice.html1
-rw-r--r--wqflask/flask_security/templates/security/email/reset_notice.txt1
-rw-r--r--wqflask/flask_security/templates/security/email/welcome.html7
-rw-r--r--wqflask/flask_security/templates/security/email/welcome.txt7
-rw-r--r--wqflask/flask_security/templates/security/forgot_password.html9
-rw-r--r--wqflask/flask_security/templates/security/login_user.html12
-rw-r--r--wqflask/flask_security/templates/security/register_user.html13
-rw-r--r--wqflask/flask_security/templates/security/reset_password.html10
-rw-r--r--wqflask/flask_security/templates/security/send_confirmation.html9
-rw-r--r--wqflask/flask_security/templates/security/send_login.html9
23 files changed, 158 insertions, 0 deletions
diff --git a/wqflask/flask_security/templates/security/.DS_Store b/wqflask/flask_security/templates/security/.DS_Store
new file mode 100644
index 00000000..5008ddfc
--- /dev/null
+++ b/wqflask/flask_security/templates/security/.DS_Store
Binary files differ
diff --git a/wqflask/flask_security/templates/security/_macros.html b/wqflask/flask_security/templates/security/_macros.html
new file mode 100644
index 00000000..8575f3db
--- /dev/null
+++ b/wqflask/flask_security/templates/security/_macros.html
@@ -0,0 +1,16 @@
+{% macro render_field_with_errors(field) %}
+ <p>
+ {{ field.label }} {{ field(**kwargs)|safe }}
+ {% if field.errors %}
+ <ul>
+ {% for error in field.errors %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </p>
+{% endmacro %}
+
+{% macro render_field(field) %}
+ <p>{{ field(**kwargs)|safe }}</p>
+{% endmacro %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/_menu.html b/wqflask/flask_security/templates/security/_menu.html
new file mode 100644
index 00000000..5291f809
--- /dev/null
+++ b/wqflask/flask_security/templates/security/_menu.html
@@ -0,0 +1,15 @@
+{% if security.registerable or security.recoverable or security.confirmabled %}
+<h2>Menu</h2>
+<ul>
+ <li><a href="{{ url_for_security('login') }}">Login</a></li>
+ {% if security.registerable %}
+ <li><a href="{{ url_for_security('register') }}">Register</a><br/></li>
+ {% endif %}
+ {% if security.recoverable %}
+ <li><a href="{{ url_for_security('forgot_password') }}">Forgot password</a><br/></li>
+ {% endif %}
+ {% if security.confirmable %}
+ <li><a href="{{ url_for_security('send_confirmation') }}">Confirm account</a></li>
+ {% endif %}
+</ul>
+{% endif %}
diff --git a/wqflask/flask_security/templates/security/_messages.html b/wqflask/flask_security/templates/security/_messages.html
new file mode 100644
index 00000000..179d0636
--- /dev/null
+++ b/wqflask/flask_security/templates/security/_messages.html
@@ -0,0 +1,9 @@
+{%- with messages = get_flashed_messages(with_categories=true) -%}
+ {% if messages %}
+ <ul class="flashes">
+ {% for category, message in messages %}
+ <li class="{{ category }}">{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+{%- endwith %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/change_password.html b/wqflask/flask_security/templates/security/change_password.html
new file mode 100644
index 00000000..8ee3eb73
--- /dev/null
+++ b/wqflask/flask_security/templates/security/change_password.html
@@ -0,0 +1,11 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Change password</h1>
+<form action="{{ url_for_security('change_password') }}" method="POST" name="change_password_form">
+ {{ change_password_form.hidden_tag() }}
+ {{ render_field_with_errors(change_password_form.password) }}
+ {{ render_field_with_errors(change_password_form.new_password) }}
+ {{ render_field_with_errors(change_password_form.new_password_confirm) }}
+ {{ render_field(change_password_form.submit) }}
+</form>
+
diff --git a/wqflask/flask_security/templates/security/email/change_notice.html b/wqflask/flask_security/templates/security/email/change_notice.html
new file mode 100644
index 00000000..d1224cf5
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/change_notice.html
@@ -0,0 +1,4 @@
+<p>Your password has been changed.</p>
+{% if security.recoverable %}
+<p>If you did not change your password, <a href="{{ url_for_security('forgot_password', _external=True) }}">click here to reset it</a>.</p>
+{% endif %}
diff --git a/wqflask/flask_security/templates/security/email/change_notice.txt b/wqflask/flask_security/templates/security/email/change_notice.txt
new file mode 100644
index 00000000..e74bd80d
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/change_notice.txt
@@ -0,0 +1,5 @@
+Your password has been changed
+{% if security.recoverable %}
+If you did not change your password, click the link below to reset it.
+{{ url_for_security('forgot_password', _external=True) }}
+{% endif %}
diff --git a/wqflask/flask_security/templates/security/email/confirmation_instructions.html b/wqflask/flask_security/templates/security/email/confirmation_instructions.html
new file mode 100644
index 00000000..5082a9a8
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/confirmation_instructions.html
@@ -0,0 +1,3 @@
+<p>Please confirm your email through the link below:</p>
+
+<p><a href="{{ confirmation_link }}">Confirm my account</a></p> \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/confirmation_instructions.txt b/wqflask/flask_security/templates/security/email/confirmation_instructions.txt
new file mode 100644
index 00000000..fb435b55
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/confirmation_instructions.txt
@@ -0,0 +1,3 @@
+Please confirm your email through the link below:
+
+{{ confirmation_link }} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/login_instructions.html b/wqflask/flask_security/templates/security/email/login_instructions.html
new file mode 100644
index 00000000..45a7cb57
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/login_instructions.html
@@ -0,0 +1,5 @@
+<p>Welcome {{ user.email }}!</p>
+
+<p>You can log into your through the link below:</p>
+
+<p><a href="{{ login_link }}">Login now</a></p> \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/login_instructions.txt b/wqflask/flask_security/templates/security/email/login_instructions.txt
new file mode 100644
index 00000000..1364ed65
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/login_instructions.txt
@@ -0,0 +1,5 @@
+Welcome {{ user.email }}!
+
+You can log into your through the link below:
+
+{{ login_link }} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/reset_instructions.html b/wqflask/flask_security/templates/security/email/reset_instructions.html
new file mode 100644
index 00000000..fd0b48d8
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/reset_instructions.html
@@ -0,0 +1 @@
+<p><a href="{{ reset_link }}">Click here to reset your password</a></p> \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/reset_instructions.txt b/wqflask/flask_security/templates/security/email/reset_instructions.txt
new file mode 100644
index 00000000..91ac288e
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/reset_instructions.txt
@@ -0,0 +1,3 @@
+Click the link below to reset your password:
+
+{{ reset_link }} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/reset_notice.html b/wqflask/flask_security/templates/security/email/reset_notice.html
new file mode 100644
index 00000000..536e2961
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/reset_notice.html
@@ -0,0 +1 @@
+<p>Your password has been reset</p> \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/reset_notice.txt b/wqflask/flask_security/templates/security/email/reset_notice.txt
new file mode 100644
index 00000000..a3fa0b4b
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/reset_notice.txt
@@ -0,0 +1 @@
+Your password has been reset \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/welcome.html b/wqflask/flask_security/templates/security/email/welcome.html
new file mode 100644
index 00000000..55eaed61
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/welcome.html
@@ -0,0 +1,7 @@
+<p>Welcome {{ user.email }}!</p>
+
+{% if security.confirmable %}
+<p>You can confirm your email through the link below:</p>
+
+<p><a href="{{ confirmation_link }}">Confirm my account</a></p>
+{% endif %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/email/welcome.txt b/wqflask/flask_security/templates/security/email/welcome.txt
new file mode 100644
index 00000000..fb6ee5b5
--- /dev/null
+++ b/wqflask/flask_security/templates/security/email/welcome.txt
@@ -0,0 +1,7 @@
+Welcome {{ user.email }}!
+
+{% if security.confirmable %}
+You can confirm your email through the link below:
+
+{{ confirmation_link }}
+{% endif %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/forgot_password.html b/wqflask/flask_security/templates/security/forgot_password.html
new file mode 100644
index 00000000..90fcaf66
--- /dev/null
+++ b/wqflask/flask_security/templates/security/forgot_password.html
@@ -0,0 +1,9 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Send password reset instructions</h1>
+<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
+ {{ forgot_password_form.hidden_tag() }}
+ {{ render_field_with_errors(forgot_password_form.email) }}
+ {{ render_field(forgot_password_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/login_user.html b/wqflask/flask_security/templates/security/login_user.html
new file mode 100644
index 00000000..d781ce08
--- /dev/null
+++ b/wqflask/flask_security/templates/security/login_user.html
@@ -0,0 +1,12 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Login</h1>
+<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
+ {{ login_user_form.hidden_tag() }}
+ {{ render_field_with_errors(login_user_form.email) }}
+ {{ render_field_with_errors(login_user_form.password) }}
+ {{ render_field_with_errors(login_user_form.remember) }}
+ {{ render_field(login_user_form.next) }}
+ {{ render_field(login_user_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/register_user.html b/wqflask/flask_security/templates/security/register_user.html
new file mode 100644
index 00000000..87cf9b1d
--- /dev/null
+++ b/wqflask/flask_security/templates/security/register_user.html
@@ -0,0 +1,13 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Register</h1>
+<form action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
+ {{ register_user_form.hidden_tag() }}
+ {{ render_field_with_errors(register_user_form.email) }}
+ {{ render_field_with_errors(register_user_form.password) }}
+ {% if register_user_form.password_confirm %}
+ {{ render_field_with_errors(register_user_form.password_confirm) }}
+ {% endif %}
+ {{ render_field(register_user_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/reset_password.html b/wqflask/flask_security/templates/security/reset_password.html
new file mode 100644
index 00000000..e6fc3f58
--- /dev/null
+++ b/wqflask/flask_security/templates/security/reset_password.html
@@ -0,0 +1,10 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Reset password</h1>
+<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form">
+ {{ reset_password_form.hidden_tag() }}
+ {{ render_field_with_errors(reset_password_form.password) }}
+ {{ render_field_with_errors(reset_password_form.password_confirm) }}
+ {{ render_field(reset_password_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/send_confirmation.html b/wqflask/flask_security/templates/security/send_confirmation.html
new file mode 100644
index 00000000..3e828407
--- /dev/null
+++ b/wqflask/flask_security/templates/security/send_confirmation.html
@@ -0,0 +1,9 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Resend confirmation instructions</h1>
+<form action="{{ url_for_security('send_confirmation') }}" method="POST" name="send_confirmation_form">
+ {{ send_confirmation_form.hidden_tag() }}
+ {{ render_field_with_errors(send_confirmation_form.email) }}
+ {{ render_field(send_confirmation_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file
diff --git a/wqflask/flask_security/templates/security/send_login.html b/wqflask/flask_security/templates/security/send_login.html
new file mode 100644
index 00000000..15611c57
--- /dev/null
+++ b/wqflask/flask_security/templates/security/send_login.html
@@ -0,0 +1,9 @@
+{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% include "security/_messages.html" %}
+<h1>Login</h1>
+<form action="{{ url_for_security('login') }}" method="POST" name="send_login_form">
+ {{ send_login_form.hidden_tag() }}
+ {{ render_field_with_errors(send_login_form.email) }}
+ {{ render_field(send_login_form.submit) }}
+</form>
+{% include "security/_menu.html" %} \ No newline at end of file