From 9ac078ea5bf05a6bd9b437f0f4df7d8a6c18671f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 14 Oct 2017 21:38:38 +0000 Subject: [PATCH] =?UTF-8?q?Utilise=20l'id=20des=20objets=20plut=C3=B4t=20q?= =?UTF-8?q?ue=20leur=20nom=20pour=20les=20id=20HTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- re2o/templatetags/massive_bootstrap_form.py | 62 +++++++++++++++------ 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/re2o/templatetags/massive_bootstrap_form.py b/re2o/templatetags/massive_bootstrap_form.py index cf6c01fe..df7edc1f 100644 --- a/re2o/templatetags/massive_bootstrap_form.py +++ b/re2o/templatetags/massive_bootstrap_form.py @@ -296,8 +296,8 @@ def mbf_js( f_name, f_value, f_bound, multiple, input_id = input_id( f_bound ), datasets = default_datasets( f_name, match_func ), create = tokenfield_create( f_name, f_bound ), - edit = tokenfield_edit( f_bound ), - remove = tokenfield_remove( f_bound ), + edit = tokenfield_edit( f_name, f_bound ), + remove = tokenfield_remove( f_name, f_bound ), updates = ''.join( [ ( '$( "#{u_id}" ).change( function() {{' 'setup_{f_name}();' @@ -495,17 +495,21 @@ def tokenfield_create( f_name, f_bound ): """ The JS script triggered when a new token is created in tokenfield. """ return ( 'function(evt) {{' - 'var data = evt.attrs.value;' - 'var i = 0;' - 'while ( i