fixed styles

This commit is contained in:
daniel 2023-03-07 16:00:23 +01:00
parent f7aab35082
commit 5a41c8b61c
2 changed files with 35 additions and 45 deletions

View File

@ -949,30 +949,20 @@ html_print_action_buttons(
?> ?>
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { $( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){ $('[id^=checkbox-delete_multiple]').click(function(){
if($(this).parent().parent().hasClass('checkselected')){ if($(this).prop("checked") === false ){
$(this).parent().parent().removeClass('checkselected'); $(this).prop("checked", false);
} } else {
else{ $(this).prop("checked", true);
$(this).parent().parent().addClass('checkselected');
} }
}); });
$('[id^=checkbox-all_delete]').change(function(){ $('#checkbox-all_delete').click(function(){
if ($("#checkbox-all_delete").prop("checked")) { if ($("#checkbox-all_delete").prop("checked") === true) {
$('[id^=checkbox-delete_multiple]') $("[id^=checkbox-delete_multiple]").prop("checked", true);
.parent()
.parent()
.addClass('checkselected');
$(".check_delete")
.prop("checked", true);
} }
else{ else{
$('[id^=checkbox-delete_multiple]') $("[id^=checkbox-delete_multiple]").prop("checked", false);
.parent()
.parent()
.removeClass('checkselected');
$(".check_delete").prop("checked", false);
} }
}); });
}); });

View File

@ -366,43 +366,43 @@ if (is_metaconsole() === true) {
html_print_table($table); html_print_table($table);
html_print_input_hidden('id_component_type', $id_component_type); $buttons = html_print_input_hidden('id_component_type', $id_component_type);
if ($id) { if ($id) {
html_print_input_hidden('update_component', 1); $buttons .= html_print_input_hidden('update_component', 1, true);
html_print_input_hidden('id', $id); $buttons .= html_print_input_hidden('id', $id, true);
$buttonCaption = __('Update'); $buttonCaption = __('Update');
$buttonIcon = 'update'; $buttonIcon = 'update';
$buttonName = 'upd'; $buttonName = 'upd';
html_print_submit_button(__('Update'), 'upd', false, 'class="sub upd"');
} else { } else {
html_print_input_hidden('create_component', 1); $buttons .= html_print_input_hidden('create_component', 1, true);
html_print_input_hidden('create_network_from_module', 0); $buttons .= html_print_input_hidden('create_network_from_module', 0, true);
$buttonCaption = __('Create'); $buttonCaption = __('Create');
$buttonIcon = 'wand'; $buttonIcon = 'wand';
$buttonName = 'crt'; $buttonName = 'crt';
} }
html_print_div( $buttons .= html_print_submit_button(
$buttonCaption,
$buttonName,
false,
['icon' => $buttonIcon],
true
);
$buttons .= html_print_button(
__('Go back'),
'go_back',
false,
'',
[ [
'class' => 'action-buttons', 'icon' => 'back',
'content' => html_print_button( 'mode' => 'secondary',
__('Go back'), ],
'go_back', true
false, );
'',
[ html_print_action_buttons(
'icon' => 'back', $buttons
'mode' => 'secondary',
],
true
).html_print_submit_button(
$buttonCaption,
$buttonName,
false,
['icon' => $buttonIcon],
true
),
]
); );
echo '</form>'; echo '</form>';