bug 5162: follow-up patch to not clear hidden input setting attribute type

Otherwise, can't saved new attributes set from a cloned
input or select control.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Galen Charlton 2010-10-29 07:40:37 -04:00 committed by Chris Nighswonger
parent 94a7573f57
commit efe3cbf85a
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@
$("select", clone).attr('name', function() {
return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId);
});
$("input,select", clone).attr('value','');
$("input#patron_attr_" + newId, clone).attr('value','');
$("select#patron_attr_" + newId, clone).attr('value','');
original.parentNode.insertBefore(clone, original.nextSibling);
}