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

B #~: Remove network mandatory input on Service Templates (#2016)

This commit is contained in:
Frederick Borges 2022-05-11 12:59:44 +02:00 committed by GitHub
parent eb531e31b5
commit aea52d52eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -137,11 +137,6 @@ define(function(require) {
$(".service_networks tbody").append(
"<tr id=\"network"+nic_index+"\">\
<td>\
<input checked=\"\" type=\"checkbox\" name=\"service_network_mandatory"+nic_index+"\"\
class=\"switch input service_network_mandatory slaac\" id=\"service_network_mandatory"+nic_index+"\" hidden=\"\">\
<label class=\"switch-paddle\" for=\"service_network_mandatory"+nic_index+"\" style=\"cursor: pointer;\"></label>\
</td>\
<td>\
<input class=\"service_network_name\" type=\"text\" data-index=\""+nic_index+"\" required />\
<small class=\"form-error\"><br/>"+Locale.tr("Can only contain alphanumeric and underscore characters, and be unique")+"</small>\
@ -297,7 +292,7 @@ define(function(require) {
var row = $(this);
var attr_name = $(".service_network_name", row).val();
if (attr_name) {
var attr_mandatory = $(".service_network_mandatory", row).prop("checked") ? "M" : "O";
var attr_mandatory = "M";
var attr_desc = ($(".service_network_description", row).val() || "");
var attr_type = $(".service_network_type", row).val() || "";
var attr_id = $(".service_network_id", row).val() || "";
@ -474,7 +469,6 @@ define(function(require) {
if (parts[1] === "network") {
$(".add_service_network", context).trigger("click");
var tr = $(".service_networks tbody > tr", context).last();
$(".service_network_mandatory", tr).prop("checked", attrs.mandatory).change();
$(".service_network_name", tr).val(attrs.name).change();
$(".service_network_description", tr).val(attrs.description).change();
$(".service_network_type", tr).val(attrs.type).change();

View File

@ -41,7 +41,6 @@
<table class="service_networks policies_table dataTable">
<thead>
<tr>
<th width="5%">{{tr "Mandatory"}}</th>
<th width="22%">{{tr "Name"}}</th>
<th width="23%">{{tr "Description"}}</th>
<th width="10%">{{tr "Type"}}</th>