Skip to content

Commit

Permalink
Show password option-issue-1087 (Cadasta#1151)
Browse files Browse the repository at this point in the history
* Show password option-issue-1087

* Show password option:issue-1087

* Show password option:issue-1087

* Show password option:issue-1087

* Show password option:issue-1087
  • Loading branch information
Shruti9520 authored and laura-barluzzi committed Mar 14, 2017
1 parent 83bf226 commit 51af604
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cadasta/templates/allauth/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$('input[type="checkbox"]').click(function() {
if($(this).prop("checked")) {
$("#id_password1").attr("type", "text");
$("#id_password2").attr("type", "text");
}
else {
$("#id_password1").attr("type", "password");
$("#id_password2").attr("type", "password");
}
});
});
</script>
<script src="{% static 'js/parsleyAddValidator.js' %}"></script>
{% endblock %}

Expand Down Expand Up @@ -58,6 +72,8 @@ <h1>{% trans "Register for a free account" %}</h1>
<div class="form-group{% if form.password1.errors %} has-error{% endif %}">
<label class="control-label" for="id_password1">{% trans "Password" %}</label>
{% render_field form.password1 class+="form-control input-lg" data-parsley-minlength="10" data-parsley-character="3" data-parsley-userfield="1" data-parsley-emailfield="1" %}
<br>
<input type="checkbox" id="showHide"><label for="showHide">&nbsp;Show Password</label>
<p class="help-block small hidden">{% 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." %}</p>
<div class="error-block">{{ form.password1.errors }}</div>
</div>
Expand Down

0 comments on commit 51af604

Please sign in to comment.