bug 7282: VM wizard - step 3 - select disk offering - prevent a person from moving on if no disk offering is selected. (merge from 2.2.beta1 branch to master branch)

This commit is contained in:
Jessica Wang 2010-11-23 20:02:49 -08:00
parent 5d083fb460
commit 25cbd6565c
2 changed files with 36 additions and 1 deletions

View File

@ -454,6 +454,18 @@
<h3>
<!--Service Offering-->
</h3>
<div class="revwiz_message_container" style="display: none;" id="wiz_message">
<div class="revwiz_message_top">
<p id="wiz_message_text">
Please select a service offering to continue</p>
</div>
<div class="revwiz_message_bottom">
<div class="revwizcontinue_button" id="wiz_message_continue">
</div>
</div>
</div>
<div class="vmpopup_offeringpanel" id="service_offering_container">
<!--
<div class="vmpopup_offeringbox">
@ -550,6 +562,18 @@
<div class="vmpopup_contentpanel">
<h3>
</h3>
<div class="revwiz_message_container" style="display: none;" id="wiz_message">
<div class="revwiz_message_top">
<p id="wiz_message_text">
Please select a disk offering to continue</p>
</div>
<div class="revwiz_message_bottom">
<div class="revwizcontinue_button" id="wiz_message_continue">
</div>
</div>
</div>
<div class="vmpopup_offeringpanel" id="data_disk_offering_container" style="display: none">
</div>
<div class="vmpopup_offeringpanel" id="root_disk_offering_container" style="display: none">

View File

@ -462,6 +462,11 @@ function initVMWizard() {
return false;
});
$vmPopup.find("#step3 #wiz_message_continue").bind("click", function(event) {
$vmPopup.find("#step3 #wiz_message").hide();
return false;
});
function getIconForOS(osType) {
if (osType == null || osType.length == 0) {
return "";
@ -730,7 +735,13 @@ function initVMWizard() {
$thisPopup.find("#wizard_review_disk_offering_label").text("Data Disk Offering:");
var checkedRadioButton = $thisPopup.find("#data_disk_offering_container input[name=data_disk_offering_radio]:checked");
}
else { //*** ISO ***
else { //*** ISO ***
// prevent a person from moving on if no disk offering is selected
if($thisPopup.find("input:radio[name=root_disk_offering_radio]:checked").length == 0) {
$thisPopup.find("#step3 #wiz_message #wiz_message_text").text("Please select a disk offering to continue");
$thisPopup.find("#step3 #wiz_message").show();
return false;
}
$thisPopup.find("#wizard_review_disk_offering_label").text("Root Disk Offering:");
var checkedRadioButton = $thisPopup.find("#root_disk_offering_container input[name=root_disk_offering_radio]:checked");
}