summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-04 22:50:20 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 12:06:08 +0200
commit14e82b35f07deeba91875b91be6a5479bbcd7712 (patch)
tree0c784fe4579ea1e8b9856a71224cb2f3a28e1fc1 /ishtar_common
parent8e5b2d492ca596d5e6f2ca5a9e00a1e6561738c3 (diff)
downloadIshtar-14e82b35f07deeba91875b91be6a5479bbcd7712.tar.bz2
Ishtar-14e82b35f07deeba91875b91be6a5479bbcd7712.zip
JS: fix bad cleary of csrf input
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/static/js/ishtar.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js
index 9cc9d3df9..184b1eff7 100644
--- a/ishtar_common/static/js/ishtar.js
+++ b/ishtar_common/static/js/ishtar.js
@@ -705,8 +705,16 @@ function clear_search_field(){
function _clear_search_criteria_fields(query){
var datatables_length = $(".dataTables_length select").val();
document.getElementById('wizard-form').reset();
- // some input seems to be not cleared...
- $('#wizard-form input').each(function(){$(this).val("")});
+ // hidden input are not cleared
+ $('#wizard-form input').each(
+ function(){
+ if($(this).attr("name") != 'csrfmiddlewaretoken'){
+ $(this).val("")
+ } else {
+ console.log('test');
+ }
+ }
+ );
$(".dataTables_length select").val(datatables_length);
$('.dataTables_length select option[value="' + datatables_length + '"]'
).prop('selected', true);