Merge branch 'ent-13003-puntos-a-arreglar-y-o-mejorar-en-creacion-de-componentes-remotos' into 'develop'

Ent 13003 puntos a arreglar y o mejorar en creacion de componentes remotos

See merge request artica/pandorafms!7041
This commit is contained in:
Jose Martin 2024-03-26 11:08:40 +00:00
commit 58180a3db5

View File

@ -1553,9 +1553,11 @@ function changePlugin() {
var moduleProtocol = $("#module_protocol").val(); var moduleProtocol = $("#module_protocol").val();
var executionType = $("#execution_type").val(); var executionType = $("#execution_type").val();
var pluginSelected = $("#server_plugin_" + moduleProtocol).val(); var pluginSelected = $("#server_plugin_" + moduleProtocol).val();
var pluginAllData = JSON.parse( var pluginAllDataSafe = $("#hidden-server_plugin_data_" + pluginSelected)
$("#hidden-server_plugin_data_" + pluginSelected).val() .val()
); .replace(/(?:\r\n|\r|\n)/g, "<br>");
var pluginAllData = JSON.parse(pluginAllDataSafe);
var pluginDescription = pluginAllData.description; var pluginDescription = pluginAllData.description;
var pluginMacros = pluginAllData.macros; var pluginMacros = pluginAllData.macros;
@ -1586,10 +1588,14 @@ function changePlugin() {
let macro = this.macro; let macro = this.macro;
let value = this.value; let value = this.value;
if (pluginMacrosElement["server_plugin"] == pluginSelected) { if (pluginMacrosElement !== null) {
if (pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]) { if (pluginMacrosElement["server_plugin"] == pluginSelected) {
value = pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]; if (pluginMacrosElement[macro + "_" + moduleProtocol + "_field"]) {
value = pluginMacrosElement[macro + "_" + moduleProtocol + "_field"];
}
} }
} else {
value = "";
} }
if ( if (