diff --git a/cadasta/core/static/css/forms.scss b/cadasta/core/static/css/forms.scss index 7564f4b78..e48d63c1f 100644 --- a/cadasta/core/static/css/forms.scss +++ b/cadasta/core/static/css/forms.scss @@ -129,6 +129,17 @@ label.required:after { // show asterisk padding-right: 36px; } +.input-group-btn:last-child > .btn { +border: 1px solid $input-border; +} + +.has-error .input-group-btn .btn, +.has-warning .input-group-btn .btn { + color: $state-danger-text; + border-color: $state-danger-text; + background-color: $state-danger-bg; +} + .has-success select, .has-error select { background-position: calc(100% - 20px) 50%; diff --git a/cadasta/core/static/js/password_widget.js b/cadasta/core/static/js/password_widget.js new file mode 100644 index 000000000..f770c34ac --- /dev/null +++ b/cadasta/core/static/js/password_widget.js @@ -0,0 +1,13 @@ +$(document).ready(function () { + $("input[type='password'] + span > button").click(function() { + var glyph = $(this).children(".glyphicon"); + if(glyph.hasClass("glyphicon-eye-close")) { + $(this).parent().prev("input").attr("type", "text"); + glyph.removeClass("glyphicon-eye-close").addClass("glyphicon-eye-open"); + } + else { + $(this).parent().prev("input").attr("type", "password"); + glyph.removeClass("glyphicon-eye-open").addClass("glyphicon-eye-close"); + } + }); +}); diff --git a/cadasta/templates/allauth/account/login.html b/cadasta/templates/allauth/account/login.html index 14cdef357..f0c0410dc 100644 --- a/cadasta/templates/allauth/account/login.html +++ b/cadasta/templates/allauth/account/login.html @@ -1,6 +1,7 @@ {% extends "account/base.html" %} {% load widget_tweaks %} +{% load staticfiles %} {% load i18n %} {% load account socialaccount %} @@ -9,6 +10,10 @@ {% block title %} | {% trans "Sign In" %}{% endblock %} +{% block extra_script %} + +{% endblock %} + {% block content %} {% if form.non_field_errors %} @@ -52,7 +57,14 @@
{% trans "Passwords must have a minimum of 10 characters and contain at least 3 of the following: lowercase characters, uppercase characters, special characters, and/or numerical characters. Passwords cannot contain the username or email address." %}
{% trans "Passwords must have a minimum of 10 characters and contain at least 3 of the following: lowercase characters, uppercase characters, special characters, and/or numerical characters. Passwords cannot contain the username or email address." %}