mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #3175: Add spoofing checkboxes to vnet wizard
This commit is contained in:
parent
17d20ec6c2
commit
492cf0878e
@ -47,6 +47,24 @@ var create_vnet_wizard_html =
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="content" id="vnetCreateBridgeTab">\
|
||||
<div class="row">\
|
||||
<div class="large-6 columns">\
|
||||
<label for="mac_spoofing">\
|
||||
<input type="checkbox" wizard_field="FILTER_MAC_SPOOFING" value="YES" name="mac_spoofing" id="mac_spoofing" />\
|
||||
'+tr("Filter MAC spoofing")+'\
|
||||
<span class="tip">'+tr("TODO")+'</span>\
|
||||
</label>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-6 columns">\
|
||||
<label for="ip_spoofing">\
|
||||
<input type="checkbox" wizard_field="FILTER_IP_SPOOFING" value="YES" name="ip_spoofing" id="ip_spoofing" />\
|
||||
'+tr("Filter IP spoofing")+'\
|
||||
<span class="tip">'+tr("TODO")+'</span>\
|
||||
</label>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-6 columns">\
|
||||
<label for="bridge">'+tr("Bridge")+':\
|
||||
|
@ -5565,7 +5565,11 @@ function retrieveWizardFields(dialog, template_json){
|
||||
fields.each(function(){
|
||||
var field = $(this);
|
||||
|
||||
if (field.prop('wizard_field_disabled') != true && field.val() != null && field.val().length){
|
||||
if ( field.prop('wizard_field_disabled') != true &&
|
||||
field.val() != null && field.val().length &&
|
||||
(field.attr("type") != "checkbox" || field.prop( "checked" ))
|
||||
){
|
||||
|
||||
var field_name = field.attr('wizard_field');
|
||||
template_json[field_name] = field.val();
|
||||
}
|
||||
@ -5585,6 +5589,16 @@ function fillWizardFields(dialog, template_json){
|
||||
|
||||
field.prop("checked", checked );
|
||||
|
||||
if(checked){
|
||||
field.change();
|
||||
}
|
||||
break;
|
||||
case "checkbox":
|
||||
var checked = (field.val().toUpperCase() ==
|
||||
template_json[field_name].toUpperCase());
|
||||
|
||||
field.prop("checked", checked );
|
||||
|
||||
if(checked){
|
||||
field.change();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user