Fix add delete of rows with buttons

Redmine #6101
Forum https://forum.pfsense.org/index.php?topic=109554.0
This commit is contained in:
Phil Davis 2016-04-10 08:44:01 +05:45 committed by Stephen Beaver
parent 695ba439fd
commit dbe64b7175

View File

@ -313,6 +313,12 @@ function add_row() {
$(this).val('');
});
// Increment the suffix number for each button element in the new group
$(newGroup).find('button').each(function() {
$(this).prop("id", bumpStringInt(this.id));
$(this).prop("name", bumpStringInt(this.name));
});
// Do the same for selectors
$(newGroup).find('select').each(function() {
$(this).prop("id", bumpStringInt(this.id));