Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Jonathan 2023-03-17 12:15:13 +01:00
commit fd5347e893
4 changed files with 214 additions and 144 deletions

View File

@ -29,8 +29,9 @@ require_once __DIR__.'/../include/functions_html.php';
if ($config['visual_animation']) { if ($config['visual_animation']) {
// form#login_form, div.login_data {
echo '<style> echo '<style>
div.container_login { div.container_login {
animation: container_login 3s ease; animation: container_login 3s ease;
} }
@ -185,7 +186,7 @@ echo '</div>';
echo '<div class="container_login">'; echo '<div class="container_login">';
echo '<div class="login_page">'; echo '<div class="login_page">';
echo '<form method="post" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">'; echo '<form method="post" id="login_form" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">';
echo '<a href="'.$logo_link.'">'; echo '<a href="'.$logo_link.'">';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
if (!isset($config['custom_logo_login'])) { if (!isset($config['custom_logo_login'])) {
@ -307,8 +308,9 @@ switch ($login_screen) {
'', '',
false, false,
'', '',
'autocomplete="off" placeholder="'.__('User').'"' 'autocomplete="off" class="input" placeholder=" "'
); );
echo '<label for="nick" class="placeholder">'.__('User').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_pass">'; echo '<div class="login_pass">';
html_print_input_text_extended( html_print_input_text_extended(
@ -320,20 +322,18 @@ switch ($login_screen) {
'', '',
false, false,
'', '',
'autocomplete="off" placeholder="'.__('Password').'"', 'autocomplete="off" class="input" placeholder=" "',
false, false,
true true
); );
echo '<label for="pass" class="placeholder">'.__('Password').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_button">'; echo '<div class="login_button">';
html_print_submit_button( html_print_submit_button(
__('Login'), __('Let&#39;s go'),
'login_button', 'login_button',
false, false,
[ ['fixed_id' => 'submit-login_button']
'fixed_id' => 'submit-login_button',
'icon' => 'signin',
]
); );
echo '</div>'; echo '</div>';
} }
@ -350,11 +350,32 @@ switch ($login_screen) {
echo '<div>'; echo '<div>';
echo '</div>'; echo '</div>';
html_print_input_text_extended('auth_code', '', 'auth_code', '', '', '', false, '', 'class="login login_password" placeholder="'.__('Authentication code').'"', false, true); html_print_input_text_extended(
'auth_code',
'',
'auth_code',
'',
'',
'',
false,
'',
'class="login login_password input" placeholder=" "',
false,
true
);
echo '<label for="pass" class="placeholder">'.__('Authentication code').'</label>';
echo '</div>'; echo '</div>';
echo '<div class="login_button">'; echo '<div class="login_button">';
// html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, 'class="next_login"'); // html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, 'class="next_login"');
html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']); html_print_submit_button(
__('Check code'),
'login_button',
false,
[
'fixed_id' => 'submit-login_button',
'class' => 'next_login',
]
);
echo '</div>'; echo '</div>';
break; break;
@ -425,33 +446,8 @@ html_print_csrf_hidden();
echo '</form></div>'; echo '</form></div>';
echo '<div class="login_data">'; echo '<div class="login_data">';
echo '<div class ="text_banner_login">';
echo '<div><span class="span1">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title1_login']) {
echo io_safe_output($config['custom_title1_login']);
} else {
echo __('WELCOME TO %s', get_product_name());
}
} else {
echo __('WELCOME TO %s', get_product_name());
}
echo '</span></div>'; echo '<div class ="img_banner_login">';
echo '<div><span class="span2">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title2_login']) {
echo io_safe_output($config['custom_title2_login']);
} else {
echo __('NEXT GENERATION');
}
} else {
echo __('NEXT GENERATION');
}
echo '</span></div>';
echo '</div>';
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') { if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image( html_print_image(
@ -467,35 +463,61 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
); );
} else { } else {
echo ' echo '
<div class="loginimg-container"> <div class="loginimg-container">
<div class="lineone"></div> <div class="lineone"></div>
<div class="linetwo"></div> <div class="linetwo"></div>
<div class="linethree"></div> <div class="linethree"></div>
<div style="display:flex;"> <div style="display:flex;">
<div class="towerone"></div> <div class="towerone"></div>
<div class="towertwo"></div> <div class="towertwo"></div>
<div class="towerthree"></div> <div class="towerthree"></div>
<div class="towerfour"></div> <div class="towerfour"></div>
</div>
</div> </div>
</div> ';
';
} }
} else { } else {
echo ' echo '
<div class="loginimg-container"> <div class="loginimg-container">
<div class="lineone"></div> <div class="lineone"></div>
<div class="linetwo"></div> <div class="linetwo"></div>
<div class="linethree"></div> <div class="linethree"></div>
<div style="display:flex;"> <div style="display:flex;">
<div class="towerone"></div> <div class="towerone"></div>
<div class="towertwo"></div> <div class="towertwo"></div>
<div class="towerthree"></div> <div class="towerthree"></div>
<div class="towerfour"></div> <div class="towerfour"></div>
</div>
</div> </div>
</div> ';
';
} }
echo '</div>';
echo '<div class ="text_banner_login">';
// echo '<div><span class="span1">';
// if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
// if ($config['custom_title1_login']) {
// echo io_safe_output($config['custom_title1_login']);
// } else {
// echo __('WELCOME TO %s', get_product_name());
// }
// } else {
// echo __('WELCOME TO %s', get_product_name());
// }
// echo '</span></div>';
echo '<div><span class="span2">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title2_login']) {
echo io_safe_output($config['custom_title2_login']);
} else {
echo __('NEXT GENERATION');
}
} else {
echo __('NEXT GENERATION');
}
echo '</span></div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';

View File

@ -392,6 +392,7 @@ if ($create_user === true) {
$values['timezone'] = (string) get_parameter('timezone'); $values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view'); $values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0);
$dashboard = get_parameter('dashboard', ''); $dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', ''); $visual_console = get_parameter('visual_console', '');
@ -653,6 +654,7 @@ if ($update_user) {
$values['default_event_filter'] = (int) get_parameter('default_event_filter'); $values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view'); $values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup'); $values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh');
// API Token information. // API Token information.
$apiTokenRenewed = (bool) get_parameter('renewAPIToken'); $apiTokenRenewed = (bool) get_parameter('renewAPIToken');
$values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']); $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']);
@ -1562,8 +1564,8 @@ $autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console'
$autorefresh_list_out['operation/events/events'] = 'Events'; $autorefresh_list_out['operation/events/events'] = 'Events';
if (isset($autorefresh_list) === false) { if (isset($autorefresh_list) === false || empty($autorefresh_list) === true || empty($autorefresh_list[0]) === true) {
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'"); $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$id."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']); $autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list === null) { if ($autorefresh_list === null) {
$autorefresh_list[0] = __('None'); $autorefresh_list[0] = __('None');
@ -1773,6 +1775,13 @@ if (is_metaconsole() === false) {
}); });
}); });
$("#button-uptbutton").click (function () {
console.log('aaaaaaaaaaaaa');
if($("#autorefresh_list option").length > 0) {
$('#autorefresh_list option').prop('selected', true);
}
});
$("input#checkbox-double_auth").change(function(e) { $("input#checkbox-double_auth").change(function(e) {
e.preventDefault(); e.preventDefault();
if (this.checked) { if (this.checked) {

View File

@ -83,12 +83,13 @@ div#login_f {
/* --- Login page - header --- */ /* --- Login page - header --- */
div#header_login { div#header_login {
background-color: rgba(0, 0, 0, 0.6); /* background-color: rgba(0, 0, 0, 0.6); */
position: absolute; position: absolute;
height: 30px; height: 30px;
margin-top: 1.04%; margin-top: 1.04%;
margin-left: 1.04%; margin-left: 1.04%;
border-radius: 8px; border-radius: 8px;
z-index: 1;
} }
div#list_icon_docs_support { div#list_icon_docs_support {
@ -138,26 +139,23 @@ li#li_margin_support {
padding-right: 5px; padding-right: 5px;
} }
/* --- Login page - form --- */
div.container_login {
margin-top: 13.89vw;
/* margin-left: 19.95vw; */
}
div.login_page { div.login_page {
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.8);
border-radius: 8px; width: 40vw;
width: 363px; min-width: 300px;
height: auto; height: 100vh;
float: left; float: left;
margin-left: 19.95vw; display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
} }
@media only screen and (max-width: 1280px) { /* @media only screen and (max-width: 1280px) {
div.login_page { div.login_page {
margin-left: 9.95vw; margin-left: 9.95vw;
} }
} } */
div.login_logo_icon { div.login_logo_icon {
margin: 4.18% 5.51% 40px; margin: 4.18% 5.51% 40px;
@ -166,42 +164,51 @@ div.login_logo_icon {
div.login_logo_icon img { div.login_logo_icon img {
margin: 0 auto; margin: 0 auto;
max-width: 100%; width: 300px;
} }
div.login_double_auth_code, div.login_double_auth_code,
div.login_nick, div.login_nick,
div.login_pass { div.login_pass {
margin: 0 auto; margin: 0 auto;
width: 70%; width: 300px;
height: 40px; height: 40px;
margin-bottom: 20px; margin-bottom: 20px;
min-width: 260px;
background-color: #fff;
opacity: 0.77;
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 3px; border-radius: 3px;
} }
div.login_nick input, div.login_nick input,
div.login_pass input { div.login_pass input {
background-color: #f6f7fb; background: transparent;
border: 0px; border: 0px;
color: #343434; border-radius: 0px;
border-radius: 3px; border-bottom: 1px solid #c5c5c5;
color: #fff;
width: 100%; width: 100%;
height: 40px; height: 40px;
font-size: 10pt; font-size: 12pt;
padding: 0px 0px 0px 8%; padding: 0px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 27px; background-size: 27px;
background-position: right 10px bottom 50%; background-position: right 10px bottom 50%;
box-sizing: border-box; box-sizing: border-box;
} }
div.login_pass > input#pass {
background-image: url(../../images/enable.svg);
}
input:not([type="image"]):focus,
textarea:focus,
select:focus {
border: 0px;
border-radius: 0px;
border-bottom: 1px solid #e7e7e7;
}
div.login_button button { div.login_button button {
width: 100%; width: 100%;
height: 40px;
box-shadow: none; box-shadow: none;
} }
@ -224,10 +231,15 @@ div.login_pass input:focus {
outline: none; outline: none;
} }
div.login_nick,
div.login_pass { div.login_pass {
position: relative; position: relative;
} }
div.login_nick {
margin-bottom: 30px;
}
#show-hide-pass { #show-hide-pass {
position: absolute; position: absolute;
right: 0px; right: 0px;
@ -256,17 +268,11 @@ div.login_pass input:-webkit-autofill:active {
width: 89%; width: 89%;
} }
div.login_nick input::-webkit-input-placeholder,
div.login_pass input::-webkit-input-placeholder {
color: #343434;
}
div.login_button, div.login_button,
div.login_button_saml { div.login_button_saml {
margin: 0 auto; margin: 0 auto;
width: 40%; width: 300px;
height: 40px; height: 40px;
min-width: 260px;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -304,7 +310,7 @@ div.login_button_saml input:hover {
} }
.login_back { .login_back {
margin-top: 60px !important; margin-top: 30px !important;
} }
.login_back input { .login_back input {
@ -318,51 +324,40 @@ div.login_button_saml input:hover {
} }
div.login_data { div.login_data {
max-width: 40.21vw; height: 100vh;
max-height: 21.82%; padding-left: 40px;
float: left; display: flex;
margin-left: 100px; flex-direction: column;
margin-right: 0px; flex-wrap: nowrap;
margin-top: 30px; justify-content: center;
padding-right: 0px; align-items: flex-start;
} }
div.text_banner_login { div.text_banner_login {
width: 100%; width: 100%;
margin-bottom: 60px;
color: white; color: white;
text-align: center; margin-top: 40px;
}
div.text_banner_login span {
width: 100%;
} }
span.span1 { span.span1 {
font-size: 38px; font-size: 38px;
letter-spacing: -0.38px; letter-spacing: -0.38px;
font-weight: bold; font-family: "lato-bolder";
color: white; color: white;
line-height: 49pt; line-height: 49pt;
} }
span.span2 { span.span2 {
font-size: 20px; display: block;
letter-spacing: -0.26px; width: 700px;
font-weight: 350; font-size: 80pt;
color: #c1ccdc; line-height: 80pt;
line-height: 32pt; font-family: "lato-bolder";
} color: #fff;
div.img_banner_login {
text-align: center;
} }
div.img_banner_login img { div.img_banner_login img {
max-width: 70%; width: 80%;
min-width: 70%;
max-height: 50%;
min-height: 50%;
} }
.reset_password { .reset_password {
@ -380,7 +375,7 @@ div.img_banner_login img {
font-weight: bold; font-weight: bold;
} }
@media all and (max-width: 1200px) { @media all and (max-width: 1266px) {
span.span1 { span.span1 {
font-size: 38px; font-size: 38px;
letter-spacing: -0.38px; letter-spacing: -0.38px;
@ -389,11 +384,11 @@ div.img_banner_login img {
line-height: 49pt; line-height: 49pt;
} }
span.span2 { span.span2 {
font-size: 20px; width: 550px;
letter-spacing: -0.26px; font-size: 60pt;
font-weight: 350; line-height: 60pt;
color: #c1ccdc; font-family: "lato-bolder";
line-height: 32pt; color: #fff;
} }
} }
@ -502,7 +497,8 @@ div.button_message_alert_form input {
background-position: center center; background-position: center center;
width: 508px; width: 508px;
height: 246px; height: 246px;
margin-left: 1vw; transform: scale(0.8);
margin-left: -50px;
} }
/* Horizontal lines */ /* Horizontal lines */
@ -708,13 +704,13 @@ div.login_pass input:-webkit-autofill,
div.login_pass input:-webkit-autofill:hover, div.login_pass input:-webkit-autofill:hover,
div.login_pass input:-webkit-autofill:focus, div.login_pass input:-webkit-autofill:focus,
div.login_pass input:-webkit-autofill:active { div.login_pass input:-webkit-autofill:active {
background-color: #f6f7fb; -webkit-text-fill-color: #c5c5c5;
border: 0px; border: 0px;
border-radius: 3px; border-bottom: 1px solid #c5c5c5;
border-radius: 0px;
width: 100%; width: 100%;
height: 40px; height: 40px;
font-size: 10pt; font-size: 12pt;
padding: 0px 0px 0px 8%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 27px; background-size: 27px;
background-position: right 10px bottom 50%; background-position: right 10px bottom 50%;
@ -728,26 +724,75 @@ div.login_pass input:-webkit-autofill:active {
background-image: url("../../images/eye-closed-input.png"); background-image: url("../../images/eye-closed-input.png");
} }
.content_alert {
margin: 0 !important;
}
button.submitButton { button.submitButton {
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-direction: row; flex-direction: row;
min-width: 110px; min-width: 110px;
height: 42px; height: 50px;
font-size: 14px; font-size: 14px;
font-family: "Pandora-Regular"; font-family: Arial, Helvetica, sans-serif;
align-items: center; align-items: center;
line-height: 24px; line-height: 24px;
box-shadow: 0px 3px 6px #c7c7c7; box-shadow: 0px 3px 6px #c7c7c7;
color: #fff; color: #fff;
border: 2px solid var(--primary-color); border: 0px;
border-radius: 8px; border-radius: 15px;
padding: 0 10px; padding: 0 10px;
cursor: pointer; cursor: pointer;
z-index: 100; z-index: 100;
font-weight: bold; font-weight: bold;
} }
.content_alert { button.buttonButton:not(.secondary):not(.link):not(.mini),
margin: 0 !important; button.submitButton:not(.secondary):not(.link):not(.mini) {
background: linear-gradient(90deg, #81b82f 0%, #1d7873 100%);
}
button.submitButton:hover {
background-position: 0 !important;
}
button.submitButton > span {
font-family: Arial, Helvetica, sans-serif;
font-size: 15pt;
}
.input-container {
height: 50px;
position: relative;
width: 100%;
}
.placeholder {
color: #c5c5c5;
top: 15px;
left: 0px;
font-size: 12pt;
line-height: 14px;
pointer-events: none;
position: absolute;
/* transform-origin: 0 100%; */
/* transition: transform 2000ms, color 2000ms; */
}
/* .input:focus ~ .placeholder,
.input:not(:placeholder-shown) ~ .placeholder {
transform: translateY(0px) scale(0.75);
} */
.input:not(:placeholder-shown) ~ .placeholder {
color: #c5c5c5;
font-size: 9pt;
top: -10px;
}
.input:focus ~ .placeholder {
color: #fff;
font-size: 9pt;
top: -10px;
} }

View File

@ -1107,12 +1107,6 @@ $(document).ready (function () {
}); });
}); });
$("#submit-uptbutton").click (function () {
if($("#autorefresh_list option").length > 0) {
$('#autorefresh_list option').prop('selected', true);
}
});
check_default_block_size() check_default_block_size()
$("#checkbox-default_block_size").change(function() { $("#checkbox-default_block_size").change(function() {
check_default_block_size(); check_default_block_size();