Login (Enhanced & Minimized Themes): Login box should now stretch to fit its content. Added login_shadow_color Default Setting.

Default Settings: When using Enabled toggle link, scrolls to previous position in setting list.
This commit is contained in:
Nate Jones 2014-12-06 01:54:30 +00:00
parent b698a14908
commit cb21c76c99
5 changed files with 42 additions and 101 deletions

View File

@ -415,6 +415,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
} }
elseif ( elseif (
$category == "theme" && $subcategory == "background_color" && $name == "array" || $category == "theme" && $subcategory == "background_color" && $name == "array" ||
$category == "theme" && $subcategory == "login_shadow_color" && $name == "text" ||
$category == "theme" && $subcategory == "login_background_color" && $name == "text" || $category == "theme" && $subcategory == "login_background_color" && $name == "text" ||
$category == "theme" && $subcategory == "domain_color" && $name == "text" || $category == "theme" && $subcategory == "domain_color" && $name == "text" ||
$category == "theme" && $subcategory == "domain_background_color" && $name == "text" || $category == "theme" && $subcategory == "domain_background_color" && $name == "text" ||

View File

@ -46,6 +46,7 @@ if (sizeof($_REQUEST) > 0) {
$action = check_str($_REQUEST["action"]); $action = check_str($_REQUEST["action"]);
$default_setting_uuids = $_REQUEST["id"]; $default_setting_uuids = $_REQUEST["id"];
$enabled = check_str($_REQUEST['enabled']); $enabled = check_str($_REQUEST['enabled']);
$category = check_str($_REQUEST['category']);
if (sizeof($default_setting_uuids) == 1 && $enabled != '') { if (sizeof($default_setting_uuids) == 1 && $enabled != '') {
$sql = "update v_default_settings set "; $sql = "update v_default_settings set ";
@ -55,7 +56,7 @@ if (sizeof($_REQUEST) > 0) {
unset($sql); unset($sql);
$_SESSION["message"] = $text['message-update']; $_SESSION["message"] = $text['message-update'];
header("Location: default_settings.php"); header("Location: default_settings.php#".$category);
exit; exit;
} }
@ -428,7 +429,7 @@ if (permission_exists("domain_select") && permission_exists("domain_setting_add"
echo "  \n"; echo "  \n";
echo " </td>\n"; echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n"; echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
echo " <a href='?id[]=".$row['default_setting_uuid']."&enabled=".(($row['default_setting_enabled'] == 'true') ? 'false' : 'true')."'>".ucwords($row['default_setting_enabled'])."</a>\n"; echo " <a href='?id[]=".$row['default_setting_uuid']."&enabled=".(($row['default_setting_enabled'] == 'true') ? 'false' : 'true')."&category=".$category."'>".ucwords($row['default_setting_enabled'])."</a>\n";
echo " </td>\n"; echo " </td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['default_setting_description']."&nbsp;</td>\n"; echo " <td valign='top' class='row_stylebg'>".$row['default_setting_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>"; echo " <td class='list_control_icons'>";

View File

@ -36,11 +36,18 @@ if ($domains_processed == 1) {
$array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).'; $array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).';
$x++; $x++;
$array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'login_shadow_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#888888';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the shadow color (HTML compatible) of the login box.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'login_background_color'; $array[$x]['default_setting_subcategory'] = 'login_background_color';
$array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffffff'; $array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true'; $array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the background color (HTML compatible) for the login box.'; $array[$x]['default_setting_description'] = 'Set the background color (hexadecimal) for the login box.';
$x++; $x++;
$array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'domain_visible'; $array[$x]['default_setting_subcategory'] = 'domain_visible';
@ -61,7 +68,7 @@ if ($domains_processed == 1) {
$array[$x]['default_setting_name'] = 'text'; $array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#000000'; $array[$x]['default_setting_value'] = '#000000';
$array[$x]['default_setting_enabled'] = 'false'; $array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Set the background color (hexidecimal) for the domain name.'; $array[$x]['default_setting_description'] = 'Set the background color (hexadecimal) for the domain name.';
$x++; $x++;
$array[$x]['default_setting_category'] = 'theme'; $array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'domain_background_opacity'; $array[$x]['default_setting_subcategory'] = 'domain_background_opacity';

View File

@ -97,38 +97,24 @@ if (
?> ?>
<?php } ?> <?php } ?>
DIV#default_login { #default_login {
z-index: 1000; display: inline-block;
position: absolute; padding: 30px;
top: 0; margin-bottom: 28px;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
#default_login_container {
display: block;
width: 300px;
height: <?php echo ($_SESSION['login']['domain_name.visible']['boolean']) ? '300px' : '267px'; ?>;
<?php <?php
if ( if (
isset($_SESSION['theme']['background_image']) || isset($_SESSION['theme']['background_image']) ||
$_SESSION['theme']['background_color'][0] != '' || $_SESSION['theme']['background_color'][0] != '' ||
$_SESSION['theme']['background_color'][1] != '' $_SESSION['theme']['background_color'][1] != ''
) { ?> ) { ?>
background-color: <?php echo $_SESSION['theme']['login_background_color']['text']; ?>; background-color: <?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? $_SESSION['theme']['login_background_color']['text'] : "#fff"; ?>;
opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>; background: rgba(<?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? hex2rgb($_SESSION['theme']['login_background_color']['text'], ',') : "255, 255, 255"; ?>, <?php echo ($_SESSION['theme']['login_opacity']['text'] != '') ? $_SESSION['theme']['login_opacity']['text'] : "1"; ?>);
filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['login_opacity']['text']); ?>);
-moz-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
-khtml-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: 0 1px 20px #888; -webkit-box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
-moz-box-shadow: 0 1px 20px #888; -moz-box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
box-shadow: 0 1px 20px #888; box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
<?php <?php
} }
?> ?>
@ -1434,46 +1420,26 @@ if (strlen($_SESSION['message']) > 0) {
// default login being used // default login being used
else { else {
$logo = (isset($_SESSION['theme']['logo']['text'])) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/enhanced/images/logo.png";
?> ?>
<div id="main_content" class='main_content' style='position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0;'> <div id="main_content" class='main_content' style='position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0;'>
<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'> <table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
<tr> <tr>
<td align='center' valign='middle'> <td align='center' valign='middle'>
<span id='default_login_container'></span> <span id='default_login'>
<br /><br /><br /> <a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' width='250'></a><br />
</td>
</tr>
</table>
</div>
<?php
}
?>
</div>
<?php
if (isset($_SESSION['theme']['logo']['text'])){
$logo = $_SESSION['theme']['logo']['text'];
}
else {
$logo = PROJECT_PATH."/themes/enhanced/images/logo.png";
}
if ($default_login) {
?>
<div id="default_login">
<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
<tr>
<td align='center' valign='middle'>
<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' width='250'></a>
<br />
<!--{body}--> <!--{body}-->
<br /><br /><br /> </span>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<?php <?php
} }
?>
</div>
<?php
$footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n"; $footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n";
echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n"; echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n";
?> ?>

View File

@ -97,38 +97,24 @@ if (
?> ?>
<?php } ?> <?php } ?>
DIV#default_login { #default_login {
z-index: 1000; display: inline-block;
position: absolute; padding: 30px;
top: 0; margin-bottom: 28px;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
#default_login_container {
display: block;
width: 300px;
height: <?php echo ($_SESSION['login']['domain_name.visible']['boolean']) ? '300px' : '267px'; ?>;
<?php <?php
if ( if (
isset($_SESSION['theme']['background_image']) || isset($_SESSION['theme']['background_image']) ||
$_SESSION['theme']['background_color'][0] != '' || $_SESSION['theme']['background_color'][0] != '' ||
$_SESSION['theme']['background_color'][1] != '' $_SESSION['theme']['background_color'][1] != ''
) { ?> ) { ?>
background-color: <?php echo $_SESSION['theme']['login_background_color']['text']; ?>; background-color: <?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? $_SESSION['theme']['login_background_color']['text'] : "#fff"; ?>;
opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>; background: rgba(<?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? hex2rgb($_SESSION['theme']['login_background_color']['text'], ',') : "255, 255, 255"; ?>, <?php echo ($_SESSION['theme']['login_opacity']['text'] != '') ? $_SESSION['theme']['login_opacity']['text'] : "1"; ?>);
filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['login_opacity']['text']); ?>);
-moz-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
-khtml-opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: 0 1px 20px #888; -webkit-box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
-moz-box-shadow: 0 1px 20px #888; -moz-box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
box-shadow: 0 1px 20px #888; box-shadow: 0 1px 20px <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? $_SESSION['theme']['login_shadow_color']['text'] : "#888"; ?>;
<?php <?php
} }
?> ?>
@ -1441,46 +1427,26 @@ legend {
// default login being used // default login being used
else { else {
$logo = (isset($_SESSION['theme']['logo']['text'])) ? $_SESSION['theme']['logo']['text'] : PROJECT_PATH."/themes/enhanced/images/logo.png";
?> ?>
<div id="main_content" style='position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0;'> <div id="main_content" class='main_content' style='position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 0;'>
<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'> <table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
<tr> <tr>
<td align='center' valign='middle'> <td align='center' valign='middle'>
<span id='default_login_container'></span> <span id='default_login'>
<br /><br /><br /> <a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' width='250'></a><br />
</td>
</tr>
</table>
</div>
<?php
}
?>
</div>
<?php
if (isset($_SESSION['theme']['logo']['text'])){
$logo = $_SESSION['theme']['logo']['text'];
}
else {
$logo = PROJECT_PATH."/themes/minimized/images/logo.png";
}
if ($default_login) {
?>
<div id="default_login">
<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
<tr>
<td align='center' valign='middle'>
<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' width='250'></a>
<br />
<!--{body}--> <!--{body}-->
<br /><br /><br /> </span>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<?php <?php
} }
?>
</div>
<?php
$footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n"; $footer .= "&copy; Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a>. All rights reserved.\n";
echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n"; echo "<div id='footer' style='position: absolute; z-index; 10000;'><span class='footer'>".$footer."</span></div>\n";
?> ?>