summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei MIHAI <smihai@entrouvert.com>2014-09-17 21:50:22 (GMT)
committerSerghei MIHAI <smihai@entrouvert.com>2014-09-19 15:46:35 (GMT)
commit563749730f972f0caf362760376cd2ae8df2126d (patch)
treeb40ab36a23a24a552160c4cacf96b75c250d7eaa
parent9e8be8ad517b04604c69059100a072dd54caee89 (diff)
downloadcalebasse-563749730f972f0caf362760376cd2ae8df2126d.zip
calebasse-563749730f972f0caf362760376cd2ae8df2126d.tar.gz
calebasse-563749730f972f0caf362760376cd2ae8df2126d.tar.bz2
personnes: emptying email and password fields on user access manage page, to
avoid confusing user with browser stored data. Closes #5452
-rw-r--r--calebasse/personnes/templates/personnes/acces-update.html6
-rw-r--r--calebasse/static/js/access.js7
2 files changed, 13 insertions, 0 deletions
diff --git a/calebasse/personnes/templates/personnes/acces-update.html b/calebasse/personnes/templates/personnes/acces-update.html
index d5a22f3..9e12dd5 100644
--- a/calebasse/personnes/templates/personnes/acces-update.html
+++ b/calebasse/personnes/templates/personnes/acces-update.html
@@ -1,4 +1,10 @@
{% 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>
diff --git a/calebasse/static/js/access.js b/calebasse/static/js/access.js
new file mode 100644
index 0000000..63de344
--- /dev/null
+++ b/calebasse/static/js/access.js
@@ -0,0 +1,7 @@
+(function($){
+ $(function() {
+ $.each(['email', 'password1', 'password2'], function(i, element) {
+ $('form input[name=' + element + ']').val('');
+ })
+ })
+})(window.jQuery)