Skip to content

Commit b8b7cd0

Browse files
committed
only add delete link when delete checkbox is present
1 parent aaa288d commit b8b7cd0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/jquery.formset.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@
114114
// Hide any labels associated with the DELETE checkbox:
115115
$('label[for="' + del.attr('id') + '"]').hide();
116116
del.remove();
117+
if (hasChildElements(row) && row.is(':visible')) {
118+
insertDeleteLink(row);
119+
}
117120
}
118121
if (hasChildElements(row)) {
119122
row.addClass(options.formCssClass);
120123
if (row.is(':visible')) {
121-
insertDeleteLink(row);
122124
applyExtraClasses(row, i);
123125
}
124126
}

0 commit comments

Comments
 (0)