login page new
This commit is contained in:
parent
a87839bd07
commit
aec0d91109
|
@ -45,9 +45,9 @@ switch ($login_screen) {
|
|||
$logo_link = 'index.php';
|
||||
$logo_title = __('Refresh');
|
||||
break;
|
||||
$splash_title = __('Splash login');
|
||||
}
|
||||
|
||||
|
||||
$url = '?login=1';
|
||||
//These variables come from index.php
|
||||
if (!empty ($page) && !empty ($sec)) {
|
||||
|
@ -64,7 +64,17 @@ if (!empty($config['login_background'])) {
|
|||
echo '<div id="login_body" ' . $login_body_style . '></div>';
|
||||
echo '<div id="header_login">';
|
||||
echo '<div id="icon_custom_pandora">';
|
||||
echo '<img src="images/custom_logo/logo_login_consola.png" alt="pandora_console">';
|
||||
if (defined ('PANDORA_ENTERPRISE')) {
|
||||
if(isset ($config['custom_logo'])){
|
||||
echo '<img src="images/custom_logo/' . $config['custom_logo'] .'" alt="pandora_console">';
|
||||
}
|
||||
else{
|
||||
echo '<img src="images/custom_logo/logo_login_consola.png" alt="pandora_console">';
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo '<img src="images/custom_logo/logo_login_consola.png" alt="pandora_console">';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<div id="list_icon_docs_support"><ul>';
|
||||
echo '<li><a href="http://wiki.pandorafms.com/" target="_blank"><img src="images/icono_docs.png" alt="docs pandora"></a></li>';
|
||||
|
@ -100,7 +110,7 @@ echo '<div class="login_page">';
|
|||
html_print_image ("images/custom_logo_login/login_logo.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
|
||||
}
|
||||
else{
|
||||
html_print_image ("images/custom_logo_login/".$config['custom_logo_login'], false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
|
||||
html_print_image ("images/custom_logo_login/".$config['custom_logo_login'], false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
|
||||
}
|
||||
echo "<br><span style='font-size:120%;color:white;top:10px;position:relative;'>Community edition</span>";
|
||||
}
|
||||
|
@ -195,18 +205,47 @@ echo '<div class="login_page">';
|
|||
}
|
||||
|
||||
echo '</form></div>';
|
||||
|
||||
echo '<div class="login_data">';
|
||||
echo '<div class ="text_banner_login">';
|
||||
echo '<div><span class="span1">';
|
||||
echo "WELCOME TO PANDORA FMS";
|
||||
if(defined ('PANDORA_ENTERPRISE')){
|
||||
if($config['custom_title1_login']){
|
||||
echo strtoupper(io_safe_output($config['custom_title1_login']));
|
||||
}
|
||||
else{
|
||||
echo __('WELCOME TO PANDORA FMS');
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo __('WELCOME TO PANDORA FMS');
|
||||
}
|
||||
echo '</span></div>';
|
||||
echo '<div><span class="span2">';
|
||||
echo " NEXT GENERATION ";
|
||||
if(defined ('PANDORA_ENTERPRISE')){
|
||||
if($config['custom_title2_login']){
|
||||
echo strtoupper(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">';
|
||||
html_print_image ("/images/splash_imagenes.png", false);
|
||||
if (defined ('PANDORA_ENTERPRISE')) {
|
||||
if(isset($config['custom_splash_login'])){
|
||||
html_print_image ("enterprise/images/custom_splash_login/".$config['custom_splash_login'], false, array ( "alt" => "splash", "border" => 0, "title" => $splash_title), false, true);
|
||||
}
|
||||
else{
|
||||
html_print_image ("enterprise/images/custom_splash_login/splash_image_default.png", false, array ("alt" => "logo", "border" => 0, "title" => $splash_title), false, true);
|
||||
}
|
||||
}
|
||||
else{
|
||||
html_print_image ("images/splash_image_default.png", false, array ("alt" => "logo", "border" => 0, "title" => $splash_title), false, true);
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
@ -304,7 +343,6 @@ html_print_div(array('id' => 'modal_alert', 'hidden' => true));
|
|||
.show ();
|
||||
}
|
||||
<?php
|
||||
html_debug_print($login_screen, true);
|
||||
switch($login_screen) {
|
||||
case 'error_authconfig':
|
||||
case 'error_emptyconfig':
|
||||
|
@ -378,7 +416,7 @@ html_print_div(array('id' => 'modal_alert', 'hidden' => true));
|
|||
});
|
||||
|
||||
$("#submit-hide-login-error").click (function () {
|
||||
$("#login_failed" ).dialog('close'):
|
||||
$("#login_failed" ).dialog('close');
|
||||
$("#login_correct_pass").dialog('close');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -217,9 +217,35 @@ else {
|
|||
$config["custom_logo_login"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
}
|
||||
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_login_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal');
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_login_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal');
|
||||
$row++;
|
||||
|
||||
//Splash login
|
||||
if(enterprise_installed()) {
|
||||
$table_styles->data[$row][0] = __('Custom Splash (login)') . ui_print_help_icon("custom_logo_login", true);
|
||||
|
||||
$table_styles->data[$row][1] = html_print_select(
|
||||
list_files('enterprise/images/custom_splash_login', "png", 1, 0), 'custom_splash_login',
|
||||
$config["custom_splash_login"], '', '', '',true,false,true,'',$open,'width:240px');
|
||||
|
||||
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_splash_login_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal');
|
||||
|
||||
$row++;
|
||||
}
|
||||
|
||||
//login title1
|
||||
if(enterprise_installed()) {
|
||||
$table_styles->data[$row][0] = __('Title 1 (login)') . ui_print_help_icon("custom_logo_login", true);
|
||||
$table_styles->data[$row][1] = html_print_input_text ('custom_title1_login', $config["custom_title1_login"], '', 50, 50, true);
|
||||
$row++;
|
||||
}
|
||||
|
||||
//login text2
|
||||
if(enterprise_installed()) {
|
||||
$table_styles->data[$row][0] = __('Title 2 (login)') . ui_print_help_icon("custom_logo_login", true);
|
||||
$table_styles->data[$row][1] = html_print_input_text ('custom_title2_login', $config["custom_title2_login"], '', 50, 50, true);
|
||||
$row++;
|
||||
}
|
||||
|
||||
$table_styles->data[$row][0] = __('Disable logo in graphs');
|
||||
$table_styles->data[$row][1] = __('Yes') . ' ' .
|
||||
|
@ -909,7 +935,7 @@ $("#button-custom_logo_preview").click (function (e) {
|
|||
return;
|
||||
|
||||
$dialog = $("<div></div>");
|
||||
$image = $("<img src=\"" + icon_path + "\">");
|
||||
$image = $("<div style='background-color:grey'><img src=\"" + icon_path + "\"></div>");
|
||||
$image
|
||||
.css('max-width', '500px')
|
||||
.css('max-height', '500px');
|
||||
|
@ -949,7 +975,7 @@ $("#button-custom_logo_login_preview").click (function (e) {
|
|||
return;
|
||||
|
||||
$dialog = $("<div></div>");
|
||||
$image = $("<img src=\"" + icon_path + "\">");
|
||||
$image = $("<div style='background-color:grey'><img src=\"" + icon_path + "\"></div>");
|
||||
$image
|
||||
.css('max-width', '500px')
|
||||
.css('max-height', '500px');
|
||||
|
@ -981,6 +1007,47 @@ $("#button-custom_logo_login_preview").click (function (e) {
|
|||
}
|
||||
});
|
||||
|
||||
$("#button-custom_splash_login_preview").click (function (e) {
|
||||
var icon_name = $("select#custom_splash_login option:selected").val();
|
||||
var icon_path = "<?php echo $config['homeurl']; if(enterprise_installed){ echo 'enterprise/'; } ?>images/custom_splash_login/" + icon_name;
|
||||
|
||||
if (icon_name == "")
|
||||
return;
|
||||
|
||||
$dialog = $("<div></div>");
|
||||
$image = $("<img src=\"" + icon_path + "\">");
|
||||
$image
|
||||
.css('max-width', '500px')
|
||||
.css('max-height', '500px');
|
||||
|
||||
try {
|
||||
$dialog
|
||||
.hide()
|
||||
.html($image)
|
||||
.dialog({
|
||||
title: "<?php echo __('Splash Preview'); ?>",
|
||||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
minHeight: 1,
|
||||
width: $image.width,
|
||||
close: function () {
|
||||
$dialog
|
||||
.empty()
|
||||
.remove();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
catch (err) {
|
||||
// console.log(err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#button-login_background_preview").click (function (e) {
|
||||
var icon_name = $("select#login_background option:selected").val();
|
||||
var icon_path = "<?php echo $config['homeurl']; ?>/images/backgrounds/" + icon_name;
|
||||
|
|
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
|
@ -467,15 +467,16 @@ function config_update_config () {
|
|||
$error_update[] = __('Font size');
|
||||
if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts')))
|
||||
$error_update[] = __('Interactive charts');
|
||||
|
||||
|
||||
if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo')))
|
||||
$error_update[] = __('Custom logo');
|
||||
if (!config_update_value ('custom_logo_login', (string) get_parameter ('custom_logo_login')))
|
||||
$error_update[] = __('Custom logo login');
|
||||
|
||||
|
||||
|
||||
if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo')))
|
||||
$error_update[] = __('Custom logo');
|
||||
if (!config_update_value ('custom_logo_login', (string) get_parameter ('custom_logo_login')))
|
||||
$error_update[] = __('Custom logo login');
|
||||
if (!config_update_value ('custom_splash_login', (string) get_parameter ('custom_splash_login')))
|
||||
$error_update[] = __('Custom splash login');
|
||||
if (!config_update_value ('custom_title1_login', (string) get_parameter ('custom_title1_login')))
|
||||
$error_update[] = __('Custom title1 login');
|
||||
if (!config_update_value ('custom_title2_login', (string) get_parameter ('custom_title2_login')))
|
||||
$error_update[] = __('Custom title2 login');
|
||||
if (!config_update_value ('login_background', (string) get_parameter ('login_background')))
|
||||
$error_update[] = __('Login background');
|
||||
if (!config_update_value ('vc_refr', get_parameter('vc_refr')))
|
||||
|
@ -1084,17 +1085,26 @@ function config_process_config () {
|
|||
config_update_value ('fixed_menu', false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!isset ($config["custom_logo"])) {
|
||||
config_update_value ('custom_logo', 'pandora_logo_head_4.png');
|
||||
}
|
||||
|
||||
}
|
||||
if (!isset ($config["custom_logo_login"])) {
|
||||
config_update_value ('custom_logo_login', 'login_logo.png');
|
||||
config_update_value ('custom_logo_login', 'login_logo_v7.png');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_splash_login"])) {
|
||||
config_update_value ('custom_splash_login', 'splash_image_default.png');
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_title1_login"])) {
|
||||
config_update_value ('custom_title1_login', __('WELCOME TO PANDORA FMS'));
|
||||
}
|
||||
|
||||
if (!isset ($config["custom_title2_login"])) {
|
||||
config_update_value ('custom_title2_login', __('NEXT GENERATION'));
|
||||
}
|
||||
|
||||
if (!isset ($config['history_db_enabled'])) {
|
||||
config_update_value ( 'history_db_enabled', false);
|
||||
}
|
||||
|
|
|
@ -3881,11 +3881,16 @@ div#list_icon_docs_support{
|
|||
margin-right: 4%;
|
||||
}
|
||||
|
||||
div#list_icon_docs_support ul{
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div#list_icon_docs_support ul li{
|
||||
display: inline-block;
|
||||
color:white;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
li#li_margin_left{
|
||||
|
@ -4033,16 +4038,15 @@ div.text_banner_login span{
|
|||
}
|
||||
|
||||
span.span1{
|
||||
font-weight: 100;
|
||||
font-weight: lighter;
|
||||
font-size: 3vw;
|
||||
font-family: leto;
|
||||
font-style: italic;
|
||||
font-family: 'lato';
|
||||
}
|
||||
|
||||
span.span2{
|
||||
font-weight: 300;
|
||||
font-size: 3vw;
|
||||
font-family: leto;
|
||||
font-family: 'lato';
|
||||
}
|
||||
|
||||
div.img_banner_login{
|
||||
|
|
|
@ -140,7 +140,8 @@ echo '<head>' . "\n";
|
|||
|
||||
//This starts the page head. In the call back function, things from $page['head'] array will be processed into the head
|
||||
ob_start ('ui_process_page_head');
|
||||
|
||||
echo '<link href="https://fonts.googleapis.com/css?family=Lato:300" rel="stylesheet">';
|
||||
echo '<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">';
|
||||
// Enterprise main
|
||||
enterprise_include ('index.php');
|
||||
|
||||
|
|
Loading…
Reference in New Issue