summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)