responsive design
This commit is contained in:
		
							parent
							
								
									92115264fb
								
							
						
					
					
						commit
						42bca3db59
					
				|  | @ -309,6 +309,10 @@ function extractConfigOptionsFromPOST($confTypes) { | ||||||
| * @param string $page the URL of the target page | * @param string $page the URL of the target page | ||||||
| */ | */ | ||||||
| function metaRefresh($page) { | function metaRefresh($page) { | ||||||
|  | 	if (!headers_sent()) { | ||||||
|  | 		header('Location: ' . $page); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
| 	if (isset($_SESSION['header'])) { | 	if (isset($_SESSION['header'])) { | ||||||
| 		echo $_SESSION['header']; | 		echo $_SESSION['header']; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -1,9 +1,8 @@ | ||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
| $Id$ |  | ||||||
| 
 | 
 | ||||||
|   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) |   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) | ||||||
|   Copyright (C) 2003 - 2017  Roland Gruber |   Copyright (C) 2003 - 2018  Roland Gruber | ||||||
| 
 | 
 | ||||||
|   This program is free software; you can redistribute it and/or modify |   This program is free software; you can redistribute it and/or modify | ||||||
|   it under the terms of the GNU General Public License as published by |   it under the terms of the GNU General Public License as published by | ||||||
|  | @ -153,7 +152,7 @@ if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	include 'main_header.php'; | 	include '../lib/adminHeader.inc'; | ||||||
| 	// print error/success messages
 | 	// print error/success messages
 | ||||||
| 	if (isset($_POST['add_suff'])) { | 	if (isset($_POST['add_suff'])) { | ||||||
| 		if (sizeof($failedDNs) > 0) { | 		if (sizeof($failedDNs) > 0) { | ||||||
|  | @ -161,7 +160,7 @@ if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { | ||||||
| 			foreach ($failedDNs as $suffix => $error) { | 			foreach ($failedDNs as $suffix => $error) { | ||||||
| 				StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . htmlspecialchars($error), htmlspecialchars($suffix)); | 				StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . htmlspecialchars($error), htmlspecialchars($suffix)); | ||||||
| 			} | 			} | ||||||
| 			include 'main_footer.php'; | 			include '../lib/adminFooter.inc'; | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
| 			// print success message
 | 			// print success message
 | ||||||
|  | @ -172,7 +171,7 @@ if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { | ||||||
| 	else { | 	else { | ||||||
| 		// no suffixes were created
 | 		// no suffixes were created
 | ||||||
| 		StatusMessage("INFO", "", _("No changes were made.")); | 		StatusMessage("INFO", "", _("No changes were made.")); | ||||||
| 		include 'main_footer.php'; | 		include '../lib/adminFooter.inc'; | ||||||
| 	} | 	} | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
|  | @ -183,24 +182,24 @@ $newSuffixes = str_replace("\\", "", $newSuffixes); | ||||||
| $newSuffixes = str_replace("'", "", $newSuffixes); | $newSuffixes = str_replace("'", "", $newSuffixes); | ||||||
| $newSuffixes = explode(";", $newSuffixes); | $newSuffixes = explode(";", $newSuffixes); | ||||||
| 
 | 
 | ||||||
| include 'main_header.php'; | include '../lib/adminHeader.inc'; | ||||||
| 	echo '<div class="user-bright smallPaddingContent">'; | 	echo '<div class="user-bright smallPaddingContent">'; | ||||||
| 	echo "<form action=\"initsuff.php\" method=\"post\">\n"; | 	echo "<form action=\"initsuff.php\" method=\"post\">\n"; | ||||||
| 	$container = new htmlTable(); | 	$container = new htmlResponsiveRow(); | ||||||
| 	$container->addElement(new htmlOutputText(_("The following suffixes are missing in LDAP. LAM can create them for you.")), true); | 	$container->add(new htmlOutputText(_("The following suffixes are missing in LDAP. LAM can create them for you.")), 12); | ||||||
| 	$container->addElement(new htmlOutputText(_("You can setup the LDAP suffixes for all account types in your LAM server profile on tab \"Account types\".")), true); | 	$container->add(new htmlOutputText(_("You can setup the LDAP suffixes for all account types in your LAM server profile on tab \"Account types\".")), 12); | ||||||
| 	$container->addElement(new htmlSpacer(null, '10px'), true); | 	$container->addVerticalSpacer('1rem'); | ||||||
| 	// print missing suffixes
 | 	// print missing suffixes
 | ||||||
| 	foreach ($newSuffixes as $newSuffix) { | 	foreach ($newSuffixes as $newSuffix) { | ||||||
| 		$container->addElement(new htmlOutputText($newSuffix), true); | 		$container->add(new htmlOutputText($newSuffix), 12); | ||||||
| 	} | 	} | ||||||
| 	$container->addElement(new htmlSpacer(null, '10px'), true); | 	$container->addVerticalSpacer('2rem'); | ||||||
| 
 | 
 | ||||||
| 	$buttonContainer = new htmlTable(); | 	$buttonContainer = new htmlGroup(); | ||||||
| 	$buttonContainer->addElement(new htmlButton('add_suff', _("Create"))); | 	$buttonContainer->addElement(new htmlButton('add_suff', _("Create"))); | ||||||
| 	$buttonContainer->addElement(new htmlButton('cancel', _("Cancel"))); | 	$buttonContainer->addElement(new htmlButton('cancel', _("Cancel"))); | ||||||
| 	$buttonContainer->addElement(new htmlHiddenInput('new_suff', implode(";", $newSuffixes))); | 	$buttonContainer->addElement(new htmlHiddenInput('new_suff', implode(";", $newSuffixes))); | ||||||
| 	$container->addElement($buttonContainer); | 	$container->add($buttonContainer, 12); | ||||||
| 	addSecurityTokenToMetaHTML($container); | 	addSecurityTokenToMetaHTML($container); | ||||||
| 
 | 
 | ||||||
| 	$tabindex = 1; | 	$tabindex = 1; | ||||||
|  | @ -208,5 +207,5 @@ include 'main_header.php'; | ||||||
| 
 | 
 | ||||||
| 	echo "</form><br>\n"; | 	echo "</form><br>\n"; | ||||||
| 	echo "</div>\n"; | 	echo "</div>\n"; | ||||||
| include 'main_footer.php'; | include '../lib/adminFooter.inc'; | ||||||
| ?>
 | ?>
 | ||||||
|  |  | ||||||
|  | @ -64,9 +64,9 @@ if (isset($dn) && isset($type)) { | ||||||
| } | } | ||||||
| else { | else { | ||||||
| 	// print error message if arguments are missing
 | 	// print error message if arguments are missing
 | ||||||
| 	include '../main_header.php'; | 	include '../../lib/adminHeader.inc'; | ||||||
| 	StatusMessage("ERROR", "No account or type given."); | 	StatusMessage("ERROR", "No account or type given."); | ||||||
| 	include '../main_footer.php'; | 	include '../../lib/adminFooter.inc'; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
|  |  | ||||||
|  | @ -1,10 +1,11 @@ | ||||||
| <?php | <?php | ||||||
| namespace LAM\ACCOUNTLIST; | namespace LAM\ACCOUNTLIST; | ||||||
|  | use \htmlResponsiveRow; | ||||||
|  | use \htmlStatusMessage; | ||||||
| /* | /* | ||||||
| $Id$ |  | ||||||
| 
 | 
 | ||||||
|   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) |   This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) | ||||||
|   Copyright (C) 2003 - 2017  Roland Gruber |   Copyright (C) 2003 - 2018  Roland Gruber | ||||||
| 
 | 
 | ||||||
|   This program is free software; you can redistribute it and/or modify |   This program is free software; you can redistribute it and/or modify | ||||||
|   it under the terms of the GNU General Public License as published by |   it under the terms of the GNU General Public License as published by | ||||||
|  | @ -59,11 +60,14 @@ if ($dn) { | ||||||
| } | } | ||||||
| else { | else { | ||||||
| 	// print error message if user was not found
 | 	// print error message if user was not found
 | ||||||
| 	include '../main_header.php'; | 	include '../../lib/adminHeader.inc'; | ||||||
| 	StatusMessage("ERROR", "", _("This user was not found!") . " (" . htmlspecialchars($user) . ")"); | 	$container = new htmlResponsiveRow(); | ||||||
| 	echo "<p> </p>"; | 	$container->addVerticalSpacer('1rem'); | ||||||
| 	echo "<p><a href=\"list.php?type=group\">" . _("Back to group list") . "</a></p>"; | 	$container->add(new htmlStatusMessage("ERROR", _("This user was not found!"), htmlspecialchars($user)), 12); | ||||||
| 	include '../main_footer.php'; | 	$container->addVerticalSpacer('1rem'); | ||||||
|  | 	$container->add(new \htmlLink(_("Back to group list"), 'javascript:history.back()'), 12); | ||||||
|  | 	parseHtml(null, $container, array(), false, $tabindex, 'user'); | ||||||
|  | 	include '../../lib/adminFooter.inc'; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -118,7 +118,7 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) { | ||||||
| 		$info = ldap_get_entries($_SESSION['ldap']->server(), $sr); | 		$info = ldap_get_entries($_SESSION['ldap']->server(), $sr); | ||||||
| 		if ($sr && $info['count'] == 0) { | 		if ($sr && $info['count'] == 0) { | ||||||
| 			// print header
 | 			// print header
 | ||||||
| 			include '../main_header.php'; | 			include '../../lib/adminHeader.inc'; | ||||||
| 			echo '<div class="user-bright smallPaddingContent">'; | 			echo '<div class="user-bright smallPaddingContent">'; | ||||||
| 			echo "<form action=\"ou_edit.php\" method=\"post\">\n"; | 			echo "<form action=\"ou_edit.php\" method=\"post\">\n"; | ||||||
| 			$tabindex = 1; | 			$tabindex = 1; | ||||||
|  | @ -142,7 +142,7 @@ if (isset($_POST['createOU']) || isset($_POST['deleteOU'])) { | ||||||
| 			parseHtml(null, $container, array(), false, $tabindex, 'user'); | 			parseHtml(null, $container, array(), false, $tabindex, 'user'); | ||||||
| 			echo "</form>"; | 			echo "</form>"; | ||||||
| 			echo '</div>'; | 			echo '</div>'; | ||||||
| 			include '../main_footer.php'; | 			include '../../lib/adminFooter.inc'; | ||||||
| 			exit(); | 			exit(); | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue