From 5d3f0caef958c31fda8b9d52991db935f9c3b0bc Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 10 Dec 2017 17:09:09 +0100 Subject: [PATCH] Task #001381 : reinitialize the search_form --- html/js/acc_ledger.js | 28 +++++++++++++++++++++++++++- include/template/ledger_search.php | 1 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 920365945..661ec5fd8 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -1372,4 +1372,30 @@ function delete_filter (p_div,p_dossier,p_filter_id) { } }) -} \ No newline at end of file +} +/** + * Reset the search_form and reinitialize all the input but ledger_type + * @param p_div prefix for DOM Element + */ +function reset_filter(p_div) { + // clean all the input fields but ledger_type remains + var elt=['date_start','date_end','date_paid_start','date_paid_end','desc','amount_min','amount_max','qcode','accounting']; + for (var i=0;idiv}button","Filtre"); $box->add_input(_('Ajout'), $save_filter); $box->add_javascript(_('Gestion Filtre'), $search_filter); +$box->add_javascript(_('Remise à zéro'), "reset_filter('{$this->div}')"); echo $box->input(); ?>