Merge branch 'ent-3974-Los-campos-de-module-plugin-no-se-guardan' into 'develop'
fixed bug in macros of plugin modules See merge request artica/pandorafms!2442
This commit is contained in:
commit
7097481cca
|
@ -1220,6 +1220,7 @@ if ($update_module || $create_module) {
|
||||||
|
|
||||||
// Get macros.
|
// Get macros.
|
||||||
$macros = (string) get_parameter('macros');
|
$macros = (string) get_parameter('macros');
|
||||||
|
$macros_names = (array) get_parameter('macro_name', []);
|
||||||
|
|
||||||
if (!empty($macros)) {
|
if (!empty($macros)) {
|
||||||
$macros = json_decode(base64_decode($macros), true);
|
$macros = json_decode(base64_decode($macros), true);
|
||||||
|
@ -1230,10 +1231,18 @@ if ($update_module || $create_module) {
|
||||||
$m_hide = $m['hide'];
|
$m_hide = $m['hide'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($m_hide == '1') {
|
if ($update_module) {
|
||||||
$macros[$k]['value'] = io_input_password(get_parameter($m['macro'], ''));
|
if ($m_hide == '1') {
|
||||||
|
$macros[$k]['value'] = io_input_password(get_parameter($m['macro'], ''));
|
||||||
|
} else {
|
||||||
|
$macros[$k]['value'] = get_parameter($m['macro'], '');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$macros[$k]['value'] = get_parameter($m['macro'], '');
|
if ($m_hide == '1') {
|
||||||
|
$macros[$k]['value'] = io_input_password($macros_names[$k]);
|
||||||
|
} else {
|
||||||
|
$macros[$k]['value'] = $macros_names[$k];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ push_table_simple($data, 'plugin_1');
|
||||||
$data = [];
|
$data = [];
|
||||||
$data[0] = 'macro_desc';
|
$data[0] = 'macro_desc';
|
||||||
$data[0] .= ui_print_help_tip('macro_help', true);
|
$data[0] .= ui_print_help_tip('macro_help', true);
|
||||||
$data[1] = html_print_input_text('macro_name', 'macro_value', '', 100, 1024, true);
|
$data[1] = html_print_input_text('macro_name[]', 'macro_value', '', 100, 1024, true);
|
||||||
$table_simple->colspan['macro_field'][1] = 3;
|
$table_simple->colspan['macro_field'][1] = 3;
|
||||||
$table_simple->rowstyle['macro_field'] = 'display:none';
|
$table_simple->rowstyle['macro_field'] = 'display:none';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue