K-Psul: resetBasket réinitialise le formset

This commit is contained in:
Aurélien Delobelle 2016-08-17 11:56:42 +02:00
parent a9cec3a920
commit 8a85125fee

View file

@ -529,6 +529,9 @@ $(document).ready(function() {
function resetBasket() {
basket_container.find('tr').remove();
mngmt_total_forms = 1;
mngmt_total_forms_input.val(1);
formset_container.find('div').remove();
}
// -----
@ -630,6 +633,8 @@ $(document).ready(function() {
var index = mngmt_total_forms;
console.log(operation_html);
operation_html.attr('data-opeindex', index);
operation_html
.find('#id_form-__prefix__-type').val(type).end()
.find('#id_form-__prefix__-amount').val(amount).end()