mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Default Login: Added ability to control login box background opacity and color via Default Settings.
This commit is contained in:
@@ -413,7 +413,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
elseif ($category == "provision" && $subcategory == "password" && $name == "var" ) {
|
elseif ($category == "provision" && $subcategory == "password" && $name == "var" ) {
|
||||||
echo " <input class='formfld' type='password' name='default_setting_value' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value=\"".$row['default_setting_value']."\">\n";
|
echo " <input class='formfld' type='password' name='default_setting_value' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' value=\"".$row['default_setting_value']."\">\n";
|
||||||
}
|
}
|
||||||
elseif ($category == "theme" && $subcategory == "background_color" && $name == "array") {
|
elseif (
|
||||||
|
$category == "theme" && $subcategory == "background_color" && $name == "array" ||
|
||||||
|
$category == "theme" && $subcategory == "login_color" && $name == "text"
|
||||||
|
) {
|
||||||
// source: http://rightjs.org
|
// source: http://rightjs.org
|
||||||
echo " <script src='".PROJECT_PATH."/resources/rightjs/right.js'></script>";
|
echo " <script src='".PROJECT_PATH."/resources/rightjs/right.js'></script>";
|
||||||
echo " <script src='".PROJECT_PATH."/resources/rightjs/right-colorpicker-src.js' type='text/javascript'></script>";
|
echo " <script src='".PROJECT_PATH."/resources/rightjs/right-colorpicker-src.js' type='text/javascript'></script>";
|
||||||
@@ -436,7 +439,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
if ($name == "array") {
|
if ($name == "array" || $name == '') {
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='30%'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap' width='30%'>\n";
|
||||||
echo " ".$text['label-order']."\n";
|
echo " ".$text['label-order']."\n";
|
||||||
|
|||||||
@@ -47,23 +47,39 @@ if ($domains_processed == 1) {
|
|||||||
$array[$x]['default_setting_subcategory'] = 'background_color';
|
$array[$x]['default_setting_subcategory'] = 'background_color';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '#ffffff';
|
$array[$x]['default_setting_value'] = '#ffffff';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_order'] = '0';
|
$array[$x]['default_setting_order'] = '0';
|
||||||
$array[$x]['default_setting_description'] = 'Enter a background (HTML compatible) color.';
|
$array[$x]['default_setting_description'] = 'Set a background (HTML compatible) color.';
|
||||||
$x++;
|
$x++;
|
||||||
$array[$x]['default_setting_category'] = 'theme';
|
$array[$x]['default_setting_category'] = 'theme';
|
||||||
$array[$x]['default_setting_subcategory'] = 'background_color';
|
$array[$x]['default_setting_subcategory'] = 'background_color';
|
||||||
$array[$x]['default_setting_name'] = 'array';
|
$array[$x]['default_setting_name'] = 'array';
|
||||||
$array[$x]['default_setting_value'] = '#f0f2f6';
|
$array[$x]['default_setting_value'] = '#f0f2f6';
|
||||||
$array[$x]['default_setting_order'] = '1';
|
$array[$x]['default_setting_order'] = '1';
|
||||||
$array[$x]['default_setting_enabled'] = 'false';
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
$array[$x]['default_setting_description'] = 'Enter a secondary background (HTML compatible) color, for a gradient effect.';
|
$array[$x]['default_setting_description'] = 'Set a secondary background (HTML compatible) color, for a gradient effect.';
|
||||||
|
$x++;
|
||||||
|
$array[$x]['default_setting_category'] = 'theme';
|
||||||
|
$array[$x]['default_setting_subcategory'] = 'login_opacity';
|
||||||
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
|
$array[$x]['default_setting_value'] = '0.35';
|
||||||
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
|
$array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).';
|
||||||
|
$x++;
|
||||||
|
$array[$x]['default_setting_category'] = 'theme';
|
||||||
|
$array[$x]['default_setting_subcategory'] = 'login_color';
|
||||||
|
$array[$x]['default_setting_name'] = 'text';
|
||||||
|
$array[$x]['default_setting_value'] = '#ffffff';
|
||||||
|
$array[$x]['default_setting_enabled'] = 'true';
|
||||||
|
$array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the login box.';
|
||||||
$x++;
|
$x++;
|
||||||
$orm = new orm;
|
$orm = new orm;
|
||||||
$orm->name('default_settings');
|
$orm->name('default_settings');
|
||||||
$orm->save($array[0]);
|
$orm->save($array[0]);
|
||||||
$orm->save($array[1]);
|
$orm->save($array[1]);
|
||||||
$orm->save($array[2]);
|
$orm->save($array[2]);
|
||||||
|
$orm->save($array[3]);
|
||||||
|
$orm->save($array[4]);
|
||||||
$message = $orm->message;
|
$message = $orm->message;
|
||||||
//print_r($message);
|
//print_r($message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,21 +95,32 @@ if (
|
|||||||
?>
|
?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
#default_login {
|
DIV#default_login {
|
||||||
background-color: #fff;
|
z-index: 1000;
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#default_login_container {
|
||||||
display: block;
|
display: block;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
padding: 30px;
|
height: 267px;
|
||||||
<?php
|
<?php
|
||||||
if (
|
if (
|
||||||
isset($_SESSION['theme']['background_image']['text']) ||
|
isset($_SESSION['theme']['background_image']['text']) ||
|
||||||
$_SESSION['theme']['background_color'][0] != '' ||
|
$_SESSION['theme']['background_color'][0] != '' ||
|
||||||
$_SESSION['theme']['background_color'][1] != ''
|
$_SESSION['theme']['background_color'][1] != ''
|
||||||
) { ?>
|
) { ?>
|
||||||
opacity: 0.93;
|
background-color: <?php echo $_SESSION['theme']['login_color']['text']; ?>;
|
||||||
filter:alpha(opacity=93);
|
opacity: <?php echo $_SESSION['theme']['login_opacity']['text']; ?>;
|
||||||
-moz-opacity:0.93;
|
filter: alpha(opacity=<?php echo (100 * (float) $_SESSION['theme']['login_opacity']['text']); ?>);
|
||||||
-khtml-opacity: 0.93;
|
-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;
|
||||||
@@ -1297,11 +1308,7 @@ legend {
|
|||||||
<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'>
|
<span id='default_login_container'></span>
|
||||||
<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo PROJECT_PATH; ?>/themes/enhanced/images/logo.png'></a>
|
|
||||||
<br />
|
|
||||||
<!--{body}-->
|
|
||||||
</span>
|
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1313,6 +1320,23 @@ legend {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
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 PROJECT_PATH; ?>/themes/enhanced/images/logo.png'></a>
|
||||||
|
<br />
|
||||||
|
<!--{body}-->
|
||||||
|
<br /><br /><br />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
$copyright .= "© Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='copyright' target='_blank'>fusionpbx.com</a>. All rights reserved.\n";
|
$copyright .= "© Copyright 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='copyright' target='_blank'>fusionpbx.com</a>. All rights reserved.\n";
|
||||||
echo "<div id='copyright' style='position: absolute; z-index; 10000;'><span class='copyright'>".$copyright."</span></div>";
|
echo "<div id='copyright' style='position: absolute; z-index; 10000;'><span class='copyright'>".$copyright."</span></div>";
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user