Procházet zdrojové kódy

Theme: Add setting to control Login box width.

reliberate před 9 roky
rodič
revize
40f1bca8f1
2 změnil soubory, kde provedl 11 přidání a 5 odebrání
  1. 7 0
      themes/default/app_defaults.php
  2. 4 5
      themes/default/template.php

+ 7 - 0
themes/default/app_defaults.php

@@ -913,6 +913,13 @@ if ($domains_processed == 1) {
 		$array[$x]['default_setting_description'] = 'Set the padding of the login box.';
 		$x++;
 		$array[$x]['default_setting_category'] = 'theme';
+		$array[$x]['default_setting_subcategory'] = 'login_width';
+		$array[$x]['default_setting_name'] = 'text';
+		$array[$x]['default_setting_value'] = '100%';
+		$array[$x]['default_setting_enabled'] = 'false';
+		$array[$x]['default_setting_description'] = 'Set the width of the login box.';
+		$x++;
+		$array[$x]['default_setting_category'] = 'theme';
 		$array[$x]['default_setting_subcategory'] = 'login_border_radius';
 		$array[$x]['default_setting_name'] = 'text';
 		$array[$x]['default_setting_value'] = '4px';

+ 4 - 5
themes/default/template.php

@@ -549,10 +549,9 @@
 /* DOMAIN SELECTOR: END ********************************************************/
 
 	#default_login {
-		display: inline-block;
 		padding: <?php echo ($_SESSION['theme']['login_padding']['text'] != '') ? $_SESSION['theme']['login_padding']['text'] : '30px'; ?>;
-		margin-bottom: 28px;
 		<?php
+		echo ($_SESSION['theme']['login_width']['text'] != '') ? 'width: '.$_SESSION['theme']['login_width']['text'].";\n" : null;
 		if (
 			isset($_SESSION['theme']['background_image']) ||
 			$_SESSION['theme']['background_color'][0] != '' ||
@@ -2013,14 +2012,14 @@
 			<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>
 				<tr>
 					<td align='center' valign='middle'>
-						<span id='default_login'>
+						<div id='default_login'>
 							<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' style='width: 250px; height: auto;'></a><br />
 							<!--{body}-->
-						</span>
+						</div>
 					</td>
 				</tr>
 				<tr>
-					<td style='width: 100%; height: 40px; vertical-align: bottom;'>
+					<td style='width: 100%; height: 35px; vertical-align: bottom;'>
 						<div id='footer' style='width: 100%;'>
 							<span class='footer'><?php echo (isset($_SESSION['theme']['footer']['text'])) ? $_SESSION['theme']['footer']['text'] : "&copy; ".$text['theme-label-copyright']." 2008 - ".date("Y")." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a> ".$text['theme-label-all_rights_reserved']; ?></span>
 						</div>