fix popup form filling in wrong select2 bug
This commit is contained in:
parent
6724355aa0
commit
0e002f6a91
|
@ -74,9 +74,10 @@
|
||||||
}
|
}
|
||||||
$addBtn.click(function() {
|
$addBtn.click(function() {
|
||||||
var nextIndex = parseInt($('#id_' + options.prefix + '-TOTAL_FORMS').val());
|
var nextIndex = parseInt($('#id_' + options.prefix + '-TOTAL_FORMS').val());
|
||||||
|
alert(nextIndex);
|
||||||
var row = $('.' + options.formCssClass + ' fieldset:first').clone().get(0);
|
var row = $('.' + options.formCssClass + ' fieldset:first').clone().get(0);
|
||||||
$(row).removeAttr('id').insertAfter($('.' + options.formCssClass + ' fieldset:last'));
|
$(row).removeAttr('id').insertAfter($('.' + options.formCssClass + ' fieldset:last'));
|
||||||
$(row).find('input,select,textarea,label').each(function() {
|
$(row).find('input,select,textarea,label,a').each(function() {
|
||||||
updateElementIndex(this, options.prefix, nextIndex);
|
updateElementIndex(this, options.prefix, nextIndex);
|
||||||
// If this is a checkbox or radiobutton, set uncheck it.
|
// If this is a checkbox or radiobutton, set uncheck it.
|
||||||
// Fix for Issue 1, reported by Wilson.Andrew.J:
|
// Fix for Issue 1, reported by Wilson.Andrew.J:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user