|
|
@ -26,8 +26,9 @@ function deleteForm(prefix, btn) { |
|
|
|
if (total >= 1){ |
|
|
|
btn.closest('tr').remove(); |
|
|
|
var forms = $('.hodnoceni'); |
|
|
|
$('#id_' + prefix + '-TOTAL_FORMS').val(forms.length); |
|
|
|
for (var i=0, formCount=forms.length; i<formCount; i++) { |
|
|
|
var formCount = forms.length - 1; // There is one extra such form hidden as template! |
|
|
|
$('#id_' + prefix + '-TOTAL_FORMS').val(formCount); |
|
|
|
for (var i=0; i<formCount; i++) { |
|
|
|
$(forms.get(i)).find(':input').each(function() { |
|
|
|
updateElementIndex(this, prefix, i); |
|
|
|
}); |
|
|
|