mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
Handle checkboxes properly in selectAddRow()
This commit is contained in:
committed by
Jakub Vrana
parent
cf10398104
commit
eb8c9929d3
@@ -310,8 +310,12 @@ function selectAddRow(field) {
|
||||
var inputs = row.getElementsByTagName('input');
|
||||
for (var i=0; i < inputs.length; i++) {
|
||||
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
inputs[i].value = '';
|
||||
inputs[i].className = '';
|
||||
if (inputs[i].type == 'checkbox') {
|
||||
inputs[i].checked = false;
|
||||
} else {
|
||||
inputs[i].value = '';
|
||||
}
|
||||
}
|
||||
field.parentNode.parentNode.appendChild(row);
|
||||
}
|
||||
|
Reference in New Issue
Block a user