mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make sure there are not empty options on dst select to avoid creating empty user or group. This issue was introduced by b4e9a4da
This commit is contained in:
parent
46f6eb7892
commit
4c4c59b94d
@ -210,6 +210,12 @@ function remove_selected(id) {
|
||||
function copy_selected(srcid, dstid) {
|
||||
src_selbox = document.getElementById(srcid);
|
||||
dst_selbox = document.getElementById(dstid);
|
||||
count = dst_selbox.options.length;
|
||||
for (index = count - 1; index >= 0; index--) {
|
||||
if (dst_selbox.options[index].value == '') {
|
||||
dst_selbox.remove(index);
|
||||
}
|
||||
}
|
||||
count = src_selbox.options.length;
|
||||
for (index = 0; index < count; index++) {
|
||||
if (src_selbox.options[index].selected) {
|
||||
|
||||
@ -393,6 +393,12 @@ function remove_selected(id) {
|
||||
function copy_selected(srcid, dstid) {
|
||||
src_selbox = document.getElementById(srcid);
|
||||
dst_selbox = document.getElementById(dstid);
|
||||
count = dst_selbox.options.length;
|
||||
for (index = count - 1; index >= 0; index--) {
|
||||
if (dst_selbox.options[index].value == '') {
|
||||
dst_selbox.remove(index);
|
||||
}
|
||||
}
|
||||
count = src_selbox.options.length;
|
||||
for (index = 0; index < count; index++) {
|
||||
if (src_selbox.options[index].selected) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user