Module manager fix

This commit is contained in:
Jose Gonzalez 2023-03-14 08:04:05 +01:00
parent ca39fa8560
commit f0a424a493
1 changed files with 40 additions and 17 deletions

View File

@ -1071,27 +1071,50 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
echo '</form>'; echo '</form>';
} }
$modalCreateModule = '<form name="create_module_form" method="post">'; // Form table for Module creation.
$input_type = html_print_input_hidden('edit_module', 1, true); $createModuleTable = new stdClass();
$input_type .= html_print_select( $createModuleTable->id = 'module_creation_modal';
policies_type_modules_availables($sec2), $createModuleTable->class = 'filter-table-adv';
'moduletype', $createModuleTable->data = [];
'',
'', $createModuleTable->data[0][] = html_print_label_input_block(
'', __('Select module type'),
'', html_print_select(
true, policies_type_modules_availables($sec2),
false, 'moduletype',
false, '',
'', '',
false, '',
'max-width:300px;' '',
true,
false,
false,
'',
false,
'max-width:300px;'
)
); );
$modalCreateModule .= $input_type; $createModuleTable->data[1][] = html_print_label_input_block(
'',
html_print_anchor(
[
'href' => 'https://pandorafms.com/Library/Library/',
'class' => 'color-black-grey invert_filter',
'content' => __('Get more modules on Monitoring Library'),
],
true
)
);
$createModuleFormTable = html_print_input_hidden('edit_module', 1, true);
$createModuleFormTable .= html_print_table($createModuleTable, true);
// Form definition.
$modalCreateModule = '<form name="create_module_form" method="post">';
$modalCreateModule .= $createModuleFormTable;
$modalCreateModule .= html_print_div( $modalCreateModule .= html_print_div(
[ [
'class' => 'action-buttons', 'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
__('Create'), __('Create'),
'create_module', 'create_module',