Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1837)
+++ branches/2.8.x/CHANGELOG	(revision 1838)
@@ -13,6 +13,8 @@
 
 
 
+13 Dez-2012 Build 1838 Dietmar Woellbrink (Luisehahne)
+! groups management now completely html valide
 13 Dez-2012 Build 1837 Dietmar Woellbrink (Luisehahne)
 ! runtime optimized in /admin/pages/index.php 
 12 Dez-2012 Build 1836 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/groups/groups_mask.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/groups_mask.inc.php	(revision 1837)
+++ branches/2.8.x/wb/admin/groups/groups_mask.inc.php	(revision 1838)
@@ -16,10 +16,9 @@
 
 /* -------------------------------------------------------- */
 // Must include code to stop this file being accessed directly
-if(defined('WB_PATH') == false)
-{
-	// Stop this file being access directly
-		die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
+if(!defined('WB_URL')) {
+	require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
+	throw new IllegalFileException();
 }
 /* -------------------------------------------------------- */
 
@@ -85,6 +84,7 @@
 						'GROUP_ID' => $rec_group['group_id'],
 						'GROUP_NAME' => $rec_group['name'],
 						'FORM_NAME_GROUPMASK' => 'frm_modify_group',
+						'GROUPNAME_DISABLED' => '',
 					));
 			} else {
 				// set changed checkboxes and prepare db data
Index: branches/2.8.x/wb/admin/groups/upgradePermissions.php
===================================================================
--- branches/2.8.x/wb/admin/groups/upgradePermissions.php	(revision 1837)
+++ branches/2.8.x/wb/admin/groups/upgradePermissions.php	(revision 1838)
@@ -17,14 +17,12 @@
 
 /* -------------------------------------------------------- */
 // Must include code to stop this file being accessed directly
-if(defined('WB_PATH') == false)
-{
-	// Stop this file being access directly
-		die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
+if(!defined('WB_URL')) {
+	require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
+	throw new IllegalFileException();
 }
 /* -------------------------------------------------------- */
 
-
 /**
  *
  *
@@ -59,6 +57,7 @@
 		'modules_install' => 0,
 		'modules_uninstall' => 0,
 		'modules_view' => 0,
+        'modules_advanced' => 0,
 		'pages' => 0,
 		'pages_add' => 0,
 		'pages_add_l0' => 0,
@@ -366,6 +365,7 @@
 function setSystemCheckboxes( &$tpl, $admin, $permissions = null )
 {
 	$array = array();
+	$aSytemArray = getSystemDefaultPermissions();
 	if(!is_array($permissions))
 	{
 		$array = convertStringToKeyArray($permissions);
@@ -382,15 +382,17 @@
  		foreach($array AS $key => $value)
 		{
 	//		if(strpos($key,'_view')) { continue; }
-			if(array_key_exists($key, $aPermissions)) { continue; }
+		$checked='';
+			if(array_key_exists($key, $aPermissions)) { 
+			 continue; 
+             }
 			$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
 			$tpl->set_var('SYS_VALUE', 1 );
 			$tpl->parse('hidden_advanced_permission_list', 'show_cmd_hidden_advanced_permission_list_block', true);
-			$checked = '';
 		}
 
 	} else {
-	// set baisc modus
+	// set basic modus
 		$tpl->set_var('SYS_NAME', "none" );
 		$tpl->set_var('SYS_VALUE', '' );
 		$tpl->parse('hidden_permission_list', 'show_cmd_hidden_permission_list_block', true);
@@ -397,11 +399,13 @@
 		$array = !is_array($array) ? array() : $array;
 		foreach($array AS $key => $value)
 		{
-			if(strpos($key,'_view')) { continue; }
+		$checked='';
+			if(strpos($key,'_view')) { 
+			 continue; 
+             }
 			$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
 			$tpl->set_var('SYS_VALUE', 1 );
 			$tpl->parse('hidden_permission_list', 'show_cmd_hidden_permission_list_block', true);
-			$checked = '';
 		}
 	}
 	reset($array);
@@ -411,12 +415,20 @@
 		$checked='';
         if( $key != '' )
 		{
-            $checked = ' checked="checked"';
+            $checked = 'checked="checked"';
 		}
 		$tpl->set_var('VALUE', 1);
-		$tpl->set_var($key.'_checked', $checked);
+		$tpl->set_var(($key.'_checked'), $checked);
 	}
 
+// clean html
+    $result = array_diff_key($aSytemArray, $array);
+	foreach($result AS $key => $value)
+	{
+		$tpl->set_var('VALUE', 1);
+		$tpl->set_var(($key.'_checked'), '');
+	}
+
 	return $array;
 }
 
Index: branches/2.8.x/wb/admin/skel/themes/htt/groups_form.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/groups_form.htt	(revision 1837)
+++ branches/2.8.x/wb/admin/skel/themes/htt/groups_form.htt	(revision 1838)
@@ -29,43 +29,43 @@
 						<div class="mbox curved h65 floatbox">
 							<h4>{TEXT_FILESYSTEM_PERMISSIONS}</h4>
 							<span>
-								<input type="checkbox" name="system_permissions[pages_view]" id="pages_view" value="1" {pages_view_checked} />
+								<input id="pages_view" type="checkbox" value="1" name="system_permissions[pages_view]" {pages_view_checked}  />
 								<label for="pages_view">{MENU_PAGES}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[media_view]" id="media_view" value="1" {media_view_checked} />
+								<input id="media_view" type="checkbox" value="1" name="system_permissions[media_view]"  {media_view_checked}/>
 								<label for="media_view">{MENU_MEDIA}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[modules_view]" id="modules_view" value="1" {modules_view_checked} />
+								<input id="modules_view" type="checkbox" value="1" name="system_permissions[modules_view]" {modules_view_checked} />
 								<label for="modules_view">{MENU_MODULES}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[templates_view]" id="templates_view" value="1" {templates_view_checked} />
+								<input id="templates_view" type="checkbox" value="1" name="system_permissions[templates_view]" {templates_view_checked} />
 								<label for="templates_view">{MENU_TEMPLATES}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[languages_view]" id="languages_view" value="1" {languages_view_checked} />
+								<input id="languages_view" type="checkbox" value="1" name="system_permissions[languages_view]" {languages_view_checked} />
 								<label for="languages_view">{MENU_LANGUAGES}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[settings_view]" id="settings_view" value="1" {settings_view_checked} />
+								<input id="settings_view" type="checkbox" value="1" name="system_permissions[settings_view]" {settings_view_checked} />
 								<label for="settings_view">{MENU_SETTINGS}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[admintools_view]" id="admintools_view" value="1" {admintools_view_checked} />
+								<input id="admintools_view" type="checkbox" value="1" name="system_permissions[admintools_view]" {admintools_view_checked} />
 								<label for="admintools_view">{MENU_ADMINTOOLS}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[users_view]" id="users_view" value="1" {users_view_checked} />
+								<input id="users_view" type="checkbox" value="1" name="system_permissions[users_view]" {users_view_checked} />
 								<label for="users_view">{MENU_USERS}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[groups_view]" id="groups_view" value="1" {groups_view_checked} />
+								<input id="groups_view" type="checkbox" value="1" name="system_permissions[groups_view]" {groups_view_checked} />
 								<label for="groups_view">{MENU_GROUPS}</label>
 							</span>
 							<span>
-								<input type="checkbox" name="system_permissions[preferences_view]" id="preferences_view" value="1" {preferences_view_checked} />
+								<input id="preferences_view" type="checkbox" value="1" name="system_permissions[preferences_view]" {preferences_view_checked}  />
 								<label for="preferences_view">{MENU_USER_PREFERENCES}</label>
 							</span>
 						</div>
@@ -219,9 +219,7 @@
 									<input name="system_permissions[templates_uninstall]" id="templates_uninstall" type="checkbox" value="1" {templates_uninstall_checked} />
 									<label for="templates_uninstall">{TEXT_DELETE}</label>
 								</li>
-								<li class="c100">
-									<label for="templates">&nbsp;</label>
-								</li>
+								<li class="c100" style="line-height: 2em;">&nbsp;</li>
 							</ul>
 						</div>
 					</div>
@@ -243,9 +241,7 @@
 									<input name="system_permissions[languages_uninstall]" id="languages_uninstall" type="checkbox" value="1" {languages_uninstall_checked} />
 									<label for="languages_uninstall">{TEXT_DELETE}</label>
 								</li>
-								<li class="c100">
-									<label for="languages">&nbsp;</label>
-								</li>
+								<li class="c100" style="line-height: 2em;">&nbsp;</li>
 							</ul>
 						</div>
 					</div>
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1837)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1838)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1837');
+if(!defined('REVISION')) define('REVISION', '1838');
 if(!defined('SP')) define('SP', '');
