diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php
index ff3ddd06cb..eb924227d0 100755
--- a/pandora_console/general/login_page.php
+++ b/pandora_console/general/login_page.php
@@ -30,16 +30,21 @@ require_once __DIR__.'/../include/functions_html.php';
if ($config['visual_animation']) {
echo '';
}
@@ -87,18 +92,36 @@ if (!empty($page) && !empty($sec)) {
}
$login_body_style = '';
-$login_body_class = '';
// Overrides the default background with the defined by the user.
-if (!empty($config['login_background'])) {
+$background_url = 'images/backgrounds/background_pandora_console_keys.jpg';
+
+if (empty($config['random_background']) === false) {
+ $random_backgrounds = scandir($config['homedir'].'/images/backgrounds/random_backgrounds');
+ unset($random_backgrounds[0], $random_backgrounds[1]);
+ $random_background = array_rand($random_backgrounds);
+ $background_url = 'images/backgrounds/random_backgrounds/'.$random_backgrounds[$random_background];
+ $background_100 = 'background-size: 100% 100% !important; ';
+}
+
+if (empty($config['login_background']) === false) {
$background_url = 'images/backgrounds/'.$config['login_background'];
- $login_body_style = "style=\"background-size: 100% 100% !important;background:linear-gradient(74deg, rgba(2, 2, 2, 0.333) 36%, transparent 36%), url('".$background_url."');\"";
+ $background_100 = 'background-size: 100% 100% !important; ';
}
// Support for Internet Explorer and Microsoft Edge browsers
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Edge') !== false) {
- $login_body_class = "class='login_body_trident'";
+ $background_url = 'images/backgrounds/background_pandora_console_keys.jpg';
+ $background_100 = '';
}
+if (empty($config['background_opacity']) === false) {
+ $opacity = $config['background_opacity'];
+} else {
+ $opacity = 30;
+}
+
+$login_body_style = 'style="'.$background_100.'background: linear-gradient(rgba(0,0,0,.'.$opacity.'), rgba(0,0,0,.'.$opacity.")), url('".$background_url."');\"";
+
// Get alternative custom in case of db fail.
$custom_fields = [
'custom_logo_login',
@@ -123,36 +146,36 @@ foreach ($custom_fields as $field) {
// Get the custom icons.
$docs_logo = ui_get_docs_logo();
$support_logo = ui_get_support_logo();
-echo '
';
+echo '
';
echo '';
echo '
';
- // html_print_submit_button(__('Login'), 'login_button', false, 'class="next_login"');
- html_print_submit_button(__('Login'), 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']);
+ html_print_submit_button(
+ __('Login'),
+ 'login_button',
+ false,
+ [
+ 'fixed_id' => 'submit-login_button',
+ 'icon' => 'signin',
+ ]
+ );
echo '
';
}
break;
@@ -360,13 +391,23 @@ if ($config['enterprise_installed']) {
}
}
+echo '
+
+
+
+
+
+
+';
+echo '
'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '').'
';
+
// CSRF validation.
html_print_csrf_hidden();
echo '
';
echo '
';
echo '
';
- echo '
';
+ echo '';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title1_login']) {
echo io_safe_output($config['custom_title1_login']);
@@ -393,7 +434,7 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
echo '
';
echo '';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
- if (isset($config['custom_splash_login'])) {
+ if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
@@ -405,25 +446,39 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
false
);
} else {
- html_print_image(
- 'enterprise/images/custom_splash_login/splash_image_default.png',
- false,
- [
- 'alt' => 'logo',
- 'border' => 0,
- ],
- false,
- false
- );
+ echo '
+
+ ';
}
} else {
- html_print_image('images/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0], false, true);
+ echo '
+
+ ';
}
echo '
';
echo ' ';
echo '
';
-echo '
'.$pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '').'
';
echo '
';
if (empty($process_error_message) && isset($mail)) {
@@ -503,7 +558,7 @@ if (isset($login_failed)) {
}
echo '
';
- html_print_submit_button('Ok', 'hide-login-error', false);
+ html_print_submit_button('Ok', 'hide-login-error', false, ['class' => ' mini']);
echo '
';
echo '
';
echo '';
@@ -527,7 +582,7 @@ if ($login_screen == 'logout') {
echo '';
echo '';
- html_print_submit_button('Ok', 'hide-login-logout', false);
+ html_print_submit_button('Ok', 'hide-login-logout', false, ['class' => ' mini']);
echo '
';
echo '';
echo '';
@@ -709,7 +764,7 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
});
});
- $("#submit-hide-login-error").click (function () {
+ $("#button-hide-login-error").click (function () {
$("#modal_alert" ).dialog('close');
});
@@ -798,7 +853,7 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
});
});
- $("#submit-hide-login-error").click (function () {
+ $("#button-hide-login-error").click (function () {
$("#login_failed" ).dialog('close');
$("#login_correct_pass").dialog('close');
});
@@ -824,7 +879,7 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
});
});
- $("#submit-reset_correct_button").click (function () {
+ $("#button-reset_correct_button").click (function () {
$("#reset_correct").dialog('close');
});
});
@@ -868,5 +923,30 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
});
}
+ $(document).ready(function () {
+ $('#show-hide-pass').click(function (e) {
+ let inputPass = this.previousElementSibling;
+
+ if (inputPass.type === "password") {
+ inputPass.type = "text";
+ inputPass.style.backgroundImage = "url('/images/eye-closed-input.png')";
+ } else {
+ inputPass.type = "password";
+ inputPass.style.backgroundImage = "url('/images/eye-open-input.png')";
+ }
+ });
+
+ $('#submit-login_button span').removeAttr('style');
+ $('#spinner_login').hide();
+ });
+
+ $('#submit-login_button').click(function (e) {
+ $('.login_nick').hide();
+ $('.login_pass').hide();
+ $('.login_button').hide();
+ $('.reset_password').hide();
+ $('#spinner_login').show();
+ });
+
/* ]]> */
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index 8f7654fa06..236378a301 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -449,8 +449,8 @@ if (enterprise_installed() === true) {
'custom_splash_login',
$config['custom_splash_login'],
'',
- '',
- '',
+ __('Default'),
+ 'default',
true,
false,
true,
@@ -663,6 +663,12 @@ if (enterprise_installed() === true) {
$row++;
}
+if (enterprise_installed() === true) {
+ $table_styles->data[$row][0] = __('Background opacity % (login)');
+ $table_styles->data[$row][1] = "