fixed styles

This commit is contained in:
daniel 2023-03-09 15:06:03 +01:00
parent 72a3cb0e3f
commit 1a63f8070a
2 changed files with 50 additions and 21 deletions

View File

@ -1070,13 +1070,57 @@ 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">';
$input_type = html_print_input_hidden('edit_module', 1, true);
$input_type .= html_print_select(
policies_type_modules_availables($sec2),
'moduletype',
'',
'',
'',
'',
true,
false,
false,
'',
false,
'max-width:300px;'
);
$modalCreateModule .= $input_type;
$modalCreateModule .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Create'),
'create_module',
false,
[
'icon' => 'next',
'mode' => 'mini secondary',
],
true
),
],
true
);
$modalCreateModule .= '</form>';
html_print_div(
[
'id' => 'modal',
'style' => 'display: none',
'content' => $modalCreateModule,
]
);
?> ?>
<script type="text/javascript"> <script type="text/javascript">
function create_module_dialog(){ function create_module_dialog(){
$('#modal') console.log('Entra');
.dialog({ $('#modal').dialog({
title: '<?php echo __('Create Module'); ?>', title: '<?php echo __('Create Module'); ?>',
resizable: true, resizable: true,
draggable: true, draggable: true,

View File

@ -293,6 +293,7 @@ $table->head[3] = __('Interpreter');
if ($management_allowed === true) { if ($management_allowed === true) {
$table->head[4] = __('Action').html_print_checkbox('all_delete', 0, false, true, false); $table->head[4] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->size[4] = '80px';
} }
$result = inventory_get_modules_list($offset); $result = inventory_get_modules_list($offset);
@ -414,30 +415,14 @@ if (is_metaconsole() === true) {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { $( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function() { $('[id^=checkbox-all_delete]').change(function() {
if ($("#checkbox-all_delete").prop("checked")) { if ($("input[name=all_delete]").prop("checked")) {
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected'); $(".custom_checkbox_input").prop("checked", true);
$(".check_delete").prop("checked", true);
} }
else { else {
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected'); $(".custom_checkbox_input").prop("checked", false);
$(".check_delete").prop("checked", false);
} }
}); });
}); });
</script> </script>