mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00

Use Django's built-in password validators with reasonable settings, and add a basic complexity validator since there isn't one provided. Additionally, fix the registration form so that it shows the help text which includes a description of what the password requirements are. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
42 lines
1.0 KiB
HTML
42 lines
1.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
<form id="registration_form" method="post" action=".">
|
|
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
|
|
{% for field in form.visible_fields %}
|
|
{% if field.name in error_fields %}
|
|
<div class="form-group alert alert-danger">
|
|
{{ field.errors }}
|
|
{% else %}
|
|
<div class="form-group">
|
|
{% endif %}
|
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
|
{{ field.label_tag }}
|
|
</div>
|
|
<div class="controls">
|
|
{{ field }}
|
|
</div>
|
|
<p>
|
|
{{ field.help_text|safe }}
|
|
</p>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<input type="submit" class="btn btn-default" value="{% trans 'Submit' %}" />
|
|
{% csrf_token %}
|
|
</form>
|
|
{% endblock %}
|
|
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$("#registration_form input:text, #registration_form textarea").first().focus();
|
|
});
|
|
</script>
|
|
{% endblock %}
|