From dbe64b7175dfc2c10832e46afa38e9fce4652b4b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 10 Apr 2016 08:44:01 +0545 Subject: [PATCH] Fix add delete of rows with buttons Redmine #6101 Forum https://forum.pfsense.org/index.php?topic=109554.0 --- src/usr/local/www/js/pfSenseHelpers.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/usr/local/www/js/pfSenseHelpers.js b/src/usr/local/www/js/pfSenseHelpers.js index 150dc8b11e..9b3d884a48 100644 --- a/src/usr/local/www/js/pfSenseHelpers.js +++ b/src/usr/local/www/js/pfSenseHelpers.js @@ -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));