Browse Source

New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page.

Laurent Destailleur 12 years ago
parent
commit
234e171e9d
4 changed files with 11 additions and 5 deletions
  1. 2 1
      ChangeLog
  2. 6 1
      htdocs/core/lib/security2.lib.php
  3. 2 2
      htdocs/core/tpl/login.tpl.php
  4. 1 1
      htdocs/theme/eldy/style.css.php

+ 2 - 1
ChangeLog

@@ -28,7 +28,8 @@ For developers:
 - Renamed some database fields, code variables and parameters from french to english.
 - First change to manage margins on contracts.
 - Add hook getFormMail.
-
+- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page.
+ 
 For translators:
 - Update language files.
 

+ 6 - 1
htdocs/core/lib/security2.lib.php

@@ -292,13 +292,18 @@ function dol_loginfunction($langs,$conf,$mysoc)
 	// Google AD
 	$main_google_ad_client = ((! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))?1:0);
 
+	// Set jquery theme
 	$dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:'');
 	$favicon=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico';
 	$jquerytheme = 'smoothness';
 	if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
 
+	// Set dol_hide_topmenu and dol_hide_leftmenu
+	$dol_hide_topmenu=GETPOST('dol_hide_topmenu');
+	$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu');
 
-	include $template_dir.'login.tpl.php';	// To use native PHP
+	// Include login page template
+	include $template_dir.'login.tpl.php';
 
 
 	$_SESSION["dol_loginmesg"] = '';

+ 2 - 2
htdocs/core/tpl/login.tpl.php

@@ -89,8 +89,8 @@ $(document).ready(function () {
 <input type="hidden" name="dst_second" id="dst_second" value="" />
 <input type="hidden" name="screenwidth" id="screenwidth" value="" />
 <input type="hidden" name="screenheight" id="screenheight" value="" />
-<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="" />
-<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="" />
+<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="<?php echo $dol_hide_topmenu; ?>" />
+<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="<?php echo $dol_hide_leftmenu; ?>" />
 
 <table class="login_table_title" summary="<?php echo dol_escape_htmltag($title); ?>" cellpadding="0" cellspacing="0" border="0" align="center">
 <tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>

+ 1 - 1
htdocs/theme/eldy/style.css.php

@@ -188,7 +188,7 @@ print '*/'."\n";
 /* ============================================================================== */
 
 body {
-<?php if (GETPOST("optioncss") == 'print') {  ?>
+<?php if (GETPOST("optioncss") == 'print' || ! empty($conf->browser->phone)) {  ?>
 	background-color: #FFFFFF;
 <?php } else { ?>
 	background: <?php print $colorbackbody; ?>;