Bug 35648: (follow-up) Clear table filter before submitting
This patch takes advise from elasticsearch-mappings.js and adds an onsubmit event to clear any DataTables filter before submitting. This should prevent hidden fields from being overwritten. To test, filter the table and make a change to one of the visible rows. After submitting, confirm that the previously-hidden rows retain the same settings as before. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
2800f7c9fb
commit
109a1e93dc
|
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
[% END %]
|
||||
[% IF ( table ) %]
|
||||
<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
|
||||
<form method="post" id="overduerulesf" action="/cgi-bin/koha/tools/overduerules.pl">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-save" />
|
||||
<input type="hidden" name="branch" value="[% branch | html %]" />
|
||||
|
|
@ -198,6 +198,12 @@
|
|||
"dom": '<"top pager"f>rt<"clear">',
|
||||
"paginate": false,
|
||||
}));
|
||||
|
||||
$("#overduerulesf").on("submit", function(e){
|
||||
$(".overduerulest").DataTable().search('').draw();
|
||||
return true;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue