1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #3615: IPv4 not required when use IPAM (#4435)

Signed-off-by: Frederick Ernesto Borges Noronha <fborges@opennebula.systems>
This commit is contained in:
Frederick Borges 2020-03-26 11:13:27 +01:00 committed by GitHub
parent 6b43d350d2
commit 0cdd029e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,6 +110,26 @@ define(function(require) {
function _onShow(){
this.securityGroupsTable.refreshResourceTableSelect();
// Deletes required on IPV4 when IPAM selected
$("input[wizard_field=\"IPAM_MAD\"]").change(function(){
var prefix_id = this.id.split("_")[0];
// Obtain the correct id for add_ar window
if (prefix_id == "add"){
prefix_id += "_ar";
}
var dynamic_id = "#" + prefix_id + "_ip_start";
if($(this).val().length>0){
$(dynamic_id).removeAttr("wizard_field");
$(dynamic_id).removeAttr("required");
}else{
$(dynamic_id).attr("wizard_field","IP");
$(dynamic_id).attr("required","required");
}
});
$("input.slaac", this.ar_section).change();
}