aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/flask_security/__init__.py2
-rw-r--r--wqflask/wqflask/static/new/javascript/login.coffee21
-rw-r--r--wqflask/wqflask/static/new/javascript/login.js15
-rw-r--r--wqflask/wqflask/templates/security/_macros.html2
-rw-r--r--wqflask/wqflask/templates/security/login_user.html2
-rw-r--r--wqflask/wqflask/templates/security/register_user.html2
-rw-r--r--wqflask/wqflask/templates/security/send_confirmation.html36
7 files changed, 59 insertions, 21 deletions
diff --git a/wqflask/flask_security/__init__.py b/wqflask/flask_security/__init__.py
index 68267cff..297033c9 100644
--- a/wqflask/flask_security/__init__.py
+++ b/wqflask/flask_security/__init__.py
@@ -12,6 +12,8 @@
__version__ = '1.6.0'
+print "using internal flask security"
+
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
from .datastore import SQLAlchemyUserDatastore, MongoEngineUserDatastore, PeeweeUserDatastore
from .decorators import auth_token_required, http_auth_required, \
diff --git a/wqflask/wqflask/static/new/javascript/login.coffee b/wqflask/wqflask/static/new/javascript/login.coffee
index 4f38a299..658fd48d 100644
--- a/wqflask/wqflask/static/new/javascript/login.coffee
+++ b/wqflask/wqflask/static/new/javascript/login.coffee
@@ -1,8 +1,19 @@
$ ->
- $(".modalize").colorbox(
- onComplete: ->
- $(".focused").focus()
- )
+ #$(".modalize").colorbox(
+ # onComplete: ->
+ # $(".focused").focus()
+ # )
+
+ $(".modalize").on("click", (event) ->
+ console.log("modalizing!!!")
+ event.preventDefault()
+ $.colorbox(
+ href: $(this).attr("href")
+ onComplete: ->
+ $(".focused").focus()
+ )
+
+ )
modal_replace = (event) ->
event.preventDefault()
@@ -17,7 +28,7 @@ $ ->
- $(".modal_replace").on("click", modal_replace)
+ $(document).on("click", ".modal_replace", modal_replace)
form_success = (data) ->
$.colorbox(
diff --git a/wqflask/wqflask/static/new/javascript/login.js b/wqflask/wqflask/static/new/javascript/login.js
index e537ac1e..d7a89f01 100644
--- a/wqflask/wqflask/static/new/javascript/login.js
+++ b/wqflask/wqflask/static/new/javascript/login.js
@@ -3,10 +3,15 @@
$(function() {
var form_success, modal_replace, submit_form;
- $(".modalize").colorbox({
- onComplete: function() {
- return $(".focused").focus();
- }
+ $(".modalize").on("click", function(event) {
+ console.log("modalizing!!!");
+ event.preventDefault();
+ return $.colorbox({
+ href: $(this).attr("href"),
+ onComplete: function() {
+ return $(".focused").focus();
+ }
+ });
});
modal_replace = function(event) {
event.preventDefault();
@@ -20,7 +25,7 @@
});
return false;
};
- $(".modal_replace").on("click", modal_replace);
+ $(document).on("click", ".modal_replace", modal_replace);
form_success = function(data) {
return $.colorbox({
open: true,
diff --git a/wqflask/wqflask/templates/security/_macros.html b/wqflask/wqflask/templates/security/_macros.html
index bd6f9786..c2d8ad71 100644
--- a/wqflask/wqflask/templates/security/_macros.html
+++ b/wqflask/wqflask/templates/security/_macros.html
@@ -22,7 +22,7 @@
<p>You must confirm your email address before signing in.</p>
<p>Check your email for confirmation instructions.</p>
<p>Can't find the email? Check your spam folder.</p>
- <p>Still can't find it? <a href="/confirm">
+ <p>Still can't find it? <a class="modal_replace" href="/confirm">
Click here to resend.</a></p>
</div>
{% else %}
diff --git a/wqflask/wqflask/templates/security/login_user.html b/wqflask/wqflask/templates/security/login_user.html
index f982dc08..e1f5970b 100644
--- a/wqflask/wqflask/templates/security/login_user.html
+++ b/wqflask/wqflask/templates/security/login_user.html
@@ -1,7 +1,7 @@
{% from "security/_macros.html" import render_only_errors %}
{% include "security/_messages.html" %}
-<div style="padding: 20px;">
+<div class="security_box">
{{ g.identity}}
<h4>Don't have an account?</h4>
diff --git a/wqflask/wqflask/templates/security/register_user.html b/wqflask/wqflask/templates/security/register_user.html
index 0f068914..9bbcd29f 100644
--- a/wqflask/wqflask/templates/security/register_user.html
+++ b/wqflask/wqflask/templates/security/register_user.html
@@ -1,7 +1,7 @@
{% from "security/_macros.html" import render_only_errors %}
{% include "security/_messages.html" %}
-<div style="padding: 20px;">
+<div class="security_box">
<h4>Already have an account?</h4>
<center>
diff --git a/wqflask/wqflask/templates/security/send_confirmation.html b/wqflask/wqflask/templates/security/send_confirmation.html
index 3e828407..29a11257 100644
--- a/wqflask/wqflask/templates/security/send_confirmation.html
+++ b/wqflask/wqflask/templates/security/send_confirmation.html
@@ -1,9 +1,29 @@
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "security/_macros.html" import render_only_errors %}
{% 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
+
+<div class="security_box">
+ <h4>Resend confirmation instructions</h4>
+
+ <form action="{{ url_for_security('send_confirmation') }}"
+ method="POST" name="send_confirmation_form">
+
+ <fieldset>
+ {{ send_confirmation_form.hidden_tag() }}
+
+ <div class="control-group">
+ <label class="control-label" for="email">Email Address</label>
+ <div class="controls">
+ <input id="email" name="email" class="focused" type="text" value="">
+ </div>
+ {{ render_only_errors(send_confirmation_form.email) }}
+
+ </div>
+
+ <div class="control-group">
+ <div class="controls"">
+ <input class="btn btn-primary" id="submit" name="submit" type="submit" value="Sign in">
+ </div>
+ </div>
+ </fieldset>
+ </form>
+</div>