Trim whitespaces from options text and fix #3674

This commit is contained in:
Renato Botelho 2014-05-27 09:59:59 -03:00
parent efa26483ee
commit d758288839

View File

@ -413,13 +413,13 @@ function proto_change() {
}
}
function poolopts_change() {
if (jQuery('#target option:selected').text().substring(0,4) == "Host") {
if (jQuery('#target option:selected').text().trim().substring(0,4) == "Host") {
jQuery('#poolopts_tr').css('display','');
jQuery('#target_network').css('display','none');
} else if (jQuery('#target option:selected').text().substring(0,6) == "Subnet") {
} else if (jQuery('#target option:selected').text().trim().substring(0,6) == "Subnet") {
jQuery('#poolopts_tr').css('display','');
jQuery('#target_network').css('display','none');
} else if (jQuery('#target option:selected').text().substring(0,5) == "Other") {
} else if (jQuery('#target option:selected').text().trim().substring(0,5) == "Other") {
jQuery('#poolopts_tr').css('display','');
jQuery('#target_network').css('display','');
} else {