Merge branch 'ent-7666-boxes-relations-nodo-mapa-red-no-funcionan' into 'develop'

Fixed issue with select2 fields

Closes pandora_enterprise#7666

See merge request artica/pandorafms!4230
This commit is contained in:
Daniel Rodriguez 2021-08-25 09:28:25 +00:00
commit 5ba27998db
2 changed files with 35 additions and 2 deletions

View File

@ -3043,6 +3043,7 @@ class NetworkMap
$table->data = [];
$table->rowstyle['template_row'] = 'display: none;';
$table->data['template_row']['node_source'] = '';
// Inputs must be not select2, cause duplication make issues.
$table->data['template_row']['interface_source'] = html_print_select(
[],
'interface_source',
@ -3050,7 +3051,21 @@ class NetworkMap
'',
__('None'),
0,
true
true,
false,
true,
'',
false,
false,
false,
false,
false,
'',
false,
false,
false,
false,
false
);
$table->data['template_row']['interface_target'] = html_print_select(
[],
@ -3059,7 +3074,21 @@ class NetworkMap
'',
__('None'),
0,
true
true,
false,
true,
'',
false,
false,
false,
false,
false,
'',
false,
false,
false,
false,
false
);
$table->data['template_row']['node_target'] = '';

View File

@ -1113,6 +1113,10 @@ function load_interfaces(selected_links) {
);
$("#relations_table tbody").append(template_relation_row);
// Update input for transform in select2.
$("#interface_source_" + i).select2();
$("#interface_target_" + i).select2();
template_relation_row = null;
});
}