diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index f0b272a5936..383b2fe07d9 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -1714,6 +1714,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel } else if(objCluster.hypervisortype == "XenServer") { $protocolSelector.empty(); $protocolSelector.append(''); + $protocolSelector.append(''); $protocolSelector.append(''); } else if(objCluster.hypervisortype == "VMware") { $protocolSelector.empty(); @@ -1742,7 +1743,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg")); isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg")); - if (protocol == "nfs" || protocol == "sharedMountPoint") { + if (protocol == "nfs" || protocol == "PreSetup" || protocol == "sharedMountPoint") { isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg")); isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg")); } else if(protocol == "iscsi") { @@ -1781,7 +1782,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel var server = trim($thisDialog.find("#add_pool_nfs_server").val()); var url = null; - if (protocol == "nfs") { + if (protocol == "nfs" || protocol == "PreSetup") { var path = trim($thisDialog.find("#add_pool_path").val()); if(path.substring(0,1)!="/") path = "/" + path; diff --git a/ui/scripts/cloud.core.zone.js b/ui/scripts/cloud.core.zone.js index 1d1780a4de3..549cc43ea64 100644 --- a/ui/scripts/cloud.core.zone.js +++ b/ui/scripts/cloud.core.zone.js @@ -877,6 +877,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { } else if(objCluster.hypervisortype == "XenServer") { $protocolSelector.empty(); $protocolSelector.append(''); + $protocolSelector.append(''); $protocolSelector.append(''); } else if(objCluster.hypervisortype == "VMware") { $protocolSelector.empty(); @@ -904,7 +905,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg")); isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg")); - if (protocol == "nfs" || protocol == "sharedMountPoint") { + if (protocol == "nfs" || protocol == "PreSetup" || protocol == "sharedMountPoint") { isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg")); isValid &= validateString("Path", $thisDialog.find("#add_pool_path"), $thisDialog.find("#add_pool_path_errormsg")); } else if(protocol == "iscsi") { @@ -942,7 +943,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) { var server = trim($thisDialog.find("#add_pool_nfs_server").val()); var url = null; - if (protocol == "nfs") { + if (protocol == "nfs" || protocol == "PreSetup") { var path = trim($thisDialog.find("#add_pool_path").val()); if(path.substring(0,1)!="/") path = "/" + path;