Project

General

Profile

0001-personnes-emptying-email-and-password-fields-on-user.patch

Serghei Mihai, 17 September 2014 11:54 PM

Download (1.46 KB)

View differences:

Subject: [PATCH] personnes: emptying email and password fields on user access
 manage page, to avoid confusing user with browser stored data.

Closes #5452
 calebasse/personnes/templates/personnes/acces-update.html | 6 ++++++
 calebasse/static/js/access.js                             | 7 +++++++
 2 files changed, 13 insertions(+)
 create mode 100644 calebasse/static/js/access.js
calebasse/personnes/templates/personnes/acces-update.html
{% extends "personnes/simple-form.html" %}
{% load static %}
{% block extrascripts %}
<script src="{% static "js/access.js" %}"></script>
{{ block.super }}
{% endblock %}
{% block appbar %}
<h2>Modifier l'accès {{ object }}</h2>
calebasse/static/js/access.js
(function($){
$(function() {
$.each(['email', 'password1', 'password2'], function(i, element) {
$('form input[name=' + element + ']').val('');
})
})
})(window.jQuery)