aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/collections/list.html2
-rw-r--r--wqflask/wqflask/templates/new_security/login_user.html15
-rw-r--r--wqflask/wqflask/user_manager.py6
3 files changed, 8 insertions, 15 deletions
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index a26e77ef..23e976e9 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -26,7 +26,7 @@
{% endif %}
</div>
- <div id="collections_list">
+ <div id="collections_list" style="width:75%;">
<table class="table table-hover table-striped" id='trait_table'>
<thead>
<tr>
diff --git a/wqflask/wqflask/templates/new_security/login_user.html b/wqflask/wqflask/templates/new_security/login_user.html
index 9e5942cd..b9f49a61 100644
--- a/wqflask/wqflask/templates/new_security/login_user.html
+++ b/wqflask/wqflask/templates/new_security/login_user.html
@@ -46,7 +46,8 @@
<div class="form-group">
<label class="col-xs-1 control-label" for="remember"></label>
<div style="margin-left:20px;" class="col-xs-4 controls">
- <input id="remember" name="remember" type="checkbox" value="y"> <b>Remember me</b>
+ <input id="remember" name="remember" type="checkbox" value="y"> <b>Remember me</b><br>
+ <input id="import_collections" name="import_collections" type="checkbox" value="y"> <b>Import existing collections</b>
</div>
</div>
@@ -54,7 +55,6 @@
<label class="col-xs-1 control-label" for="submit"></label>
<div style="margin-left:20px;" class="col-xs-4 controls">
<input id="next" name="next" type="hidden" value="">
- <input id="import_collections" name="import_collections" type="hidden" value="false">
<input class="btn btn-primary" id="submit" name="submit" type="submit" value="Sign in">
</div>
</div>
@@ -101,17 +101,6 @@ label.error,div.error{
});
});
- $("input[name=submit]").on("click", function() {
- import_collections = confirm("Would you like to import existing collections?")
- if (import_collections == true) {
- $("input[name=import_collections]").val("true");
- }
- else {
- $("input[name=import_collections]").val("false");
- }
- $("#loginUserForm").submit();
- });
-
</script>
{% include "new_security/_scripts.html" %}
diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py
index 64fa82c1..598af0a6 100644
--- a/wqflask/wqflask/user_manager.py
+++ b/wqflask/wqflask/user_manager.py
@@ -538,7 +538,11 @@ class LoginUser(object):
logger.debug("I will remember you")
self.remember_me = True
- import_col = params['import_collections']
+ if 'import_collections' in params:
+ import_col = "true"
+ else:
+ import_col = "false"
+
#g.cookie_session.import_traits_to_user()
return self.actual_login(user, import_collections=import_col)