Skip to content

Commit

Permalink
Merge pull request #552 from grycap/devel
Browse files Browse the repository at this point in the history
Implements: #550
  • Loading branch information
micafer authored May 16, 2024
2 parents b0b9cba + f516f8c commit 7cef8ad
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions app/templates/advanced_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,28 @@ <h5>Cloud Provider:</h5>
});
}

function selectedSiteImageChanged() {
// disable the other select of AppDB images
var selected = $("#selectedSiteImage option:selected" ).text();
if (selected == " - Select one image - ") {
$("#selectedImage").prop('disabled', false);
} else {
$("#selectedImage").prop('disabled', true);
}
activateSubmit()
}

function selectedImageChanged() {
// disable the other select of site images
var selected = $("#selectedImage option:selected" ).text();
if (selected == " - Select one image - ") {
$("#selectedSiteImage").prop('disabled', false);
} else {
$("#selectedSiteImage").prop('disabled', true);
}
activateSubmit()
}

function activateSubmit() {
$(".submitBtn").attr("disabled", false);
}
Expand Down Expand Up @@ -252,15 +274,15 @@ <h5>Cloud Provider:</h5>
<label>Select only one of this options AppDB or Site image:</label>
<br/>
<label>Select AppDB image:</label>
<select class="js-example-basic-single js-states form-control" id="selectedImage" name="extra_opts.selectedImage" onchange="activateSubmit()">
<select class="js-example-basic-single js-states form-control" id="selectedImage" name="extra_opts.selectedImage" onchange="selectedImageChanged()">
<option name="selectedImage" value="">Select provider</option>
</select>
</div>

<div id="siteImages" style="display: none;">
<br/>
<label>Select Site image:</label>
<select class="js-example-basic-single js-states form-control" id="selectedSiteImage" name="extra_opts.selectedSiteImage" onchange="activateSubmit()">
<select class="js-example-basic-single js-states form-control" id="selectedSiteImage" name="extra_opts.selectedSiteImage" onchange="selectedSiteImageChanged()">
<option name="selectedSiteImage" value="">Select provider</option>
</select>
</div>
Expand Down

0 comments on commit 7cef8ad

Please sign in to comment.