diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 0850260ed2..4299c41f09 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -913,7 +913,7 @@ if ($new_agent === false) { __('Delete agent'), 'deleteAgent', false, - 'onClick=onClick="if (!confirm(\'"'.__('Are you sure?').'"\')) return false;\" href=\'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=\''.$id_agente, + 'deleteAgentDialog('.$id_agente.')', [ 'icon' => 'delete', 'mode' => 'secondary', @@ -922,28 +922,24 @@ if ($new_agent === false) { ); } } else { - $submitButton = html_print_submit_button( + $submitButton = html_print_input_hidden('create_agent', 1); + $submitButton .= html_print_submit_button( __('Create'), 'crtbutton', false, [ 'icon' => 'wand'], true ); - $submitButton .= html_print_go_back_button( - 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', - ['button_class' => ''], - true - ); - $submitButton .= html_print_input_hidden('create_agent', 1); } -html_print_div( - [ - 'class' => 'action-buttons', - 'content' => $submitButton, - ] +$submitButton .= html_print_go_back_button( + 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente', + ['button_class' => ''], + true ); +html_print_action_buttons($submitButton); + echo ''; echo ''; @@ -965,6 +961,15 @@ ui_require_jquery_file('bgiframe'); } } + function deleteAgentDialog($idAgente) { + confirmDialog({ + title: "", + message: "", + onAccept: function() { + window.location.assign('index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente='+$idAgente); + } + }); + } //Use this function for change 3 icons when change the selectbox function changeIcons() { @@ -1076,8 +1081,8 @@ ui_require_jquery_file('bgiframe'); paint_qrcode( "", "#qr_code_agent_view", - 256, - 256 + 128, + 128 ); } $("#text-agente").prop('readonly', true); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index ca1918a16f..bcc33bdc4c 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -956,17 +956,16 @@ if ($agents !== false) { if ((bool) check_acl($config['id_user'], 0, 'AW') === true) { // Create agent button. echo '
'; } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 3f12eec1a5..146c53b1a9 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -3321,6 +3321,29 @@ function html_print_input_color($name, $value, $id='', $class=false, $return=fal } +/** + * Action buttons. + * + * @param string $buttons Buttons for add. + * @param boolean $return Return. + * @param boolean $principal Principal Action buttons. + * @param string $class Special classes. + * + * @return mixed. + */ +function html_print_action_buttons(string $buttons, bool $return=false, bool $principal=true, string $class='fixed_action_buttons fixed_action_buttons_size') +{ + return html_print_div( + [ + 'id' => ($principal === true) ? 'principal_action_buttons' : 'action_buttons_'.rand(), + 'class' => 'action-buttons '.$class, + 'content' => $buttons, + ], + $return + ); +} + + /** * Render an submit input button element. * diff --git a/pandora_console/include/styles/agent_manager.css b/pandora_console/include/styles/agent_manager.css index f484a72eb0..8e10b578a7 100644 --- a/pandora_console/include/styles/agent_manager.css +++ b/pandora_console/include/styles/agent_manager.css @@ -30,7 +30,6 @@ } .agent_qr { - width: 30%; text-align: center; box-sizing: border-box; padding: 10px 0px; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index f3e0c83379..7cac23fa94 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -9464,7 +9464,7 @@ button.ui-button.ui-widget.submit-cancel:active { height: 40px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; - margin-left: -59px; + margin-left: -56px; border: 1px solid #c0ccdc; background-color: #f6f7fb; padding: 0 16px; @@ -9764,6 +9764,8 @@ tr.bring_next_field { .fixed_action_buttons { position: fixed; padding: 0px; - bottom: 50px; - right: 10px; +} + +.fixed_action_buttons_size { + width: 1064px; } diff --git a/pandora_console/index.php b/pandora_console/index.php index d3fda4f24d..50ae622f7a 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1491,6 +1491,8 @@ require 'include/php_to_js_values.php'; ?>