Project

General

Profile

« Previous | Next » 

Revision 1943

Added by darkviper over 11 years ago

fixed/updated /admin/groups - permissions

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
31 Jul-2013 Build 1943 M.v.d.Decken(DarkViper)
15
# fixed/updated /admin/groups - permissions
14 16
30 Jul-2013 Build 1942 M.v.d.Decken(DarkViper)
15 17
# Tooltips in backend
16 18
30 Jul-2013 Build 1941 M.v.d.Decken(DarkViper)
branches/2.8.x/wb/admin/groups/groups_mask.inc.php
69 69
					{
70 70
						$group_id = $rec_group['group_id'];
71 71
		// Explode system permissions
72
						$system_permissions = $rec_group['system_permissions'];
72
						$system_permissions = explode(',', $rec_group['system_permissions']);
73 73
		// Explode module permissions
74 74
		 				$module_permissions = explode(',', $rec_group['module_permissions']);
75 75
		// Explode template permissions
branches/2.8.x/wb/admin/groups/upgradePermissions.php
146 146
 * @param
147 147
 * @return string: parsed HTML-content
148 148
 */
149
	function set_system_permissions ($system_permissions = array())
149
	function set_system_permissions ($aSystemPermissions = array())
150 150
	{
151 151
		// Implode system permissions
152
		$imploded_system_permissions = '';
153
		$system_permissions = !is_array($system_permissions) ? array() : $system_permissions;
154
		foreach($system_permissions AS $key => $value)
152
		$aSystemPermissions = !is_array($aSystemPermissions) ? array() : $aSystemPermissions;
153
		$aSystemPermissionsSet = array();
154
		foreach($aSystemPermissions AS $key => $value)
155 155
		{
156 156
			if($value == true)
157 157
			{
158
				if($imploded_system_permissions == '')
159
				{
160
					$imploded_system_permissions = $key;
161
				} else {
162
					$imploded_system_permissions .= ','.$key;
163
				}
158
				$aSystemPermissionsSet[] = $key;
164 159
			}
165 160
		}
166
		return $imploded_system_permissions;
161
		return implode(',', $aSystemPermissionsSet);
167 162
	}
168 163

  
169 164
/* *****************************************************************************
......
302 297
	}
303 298
	if(is_array($SystemPermissions)&& sizeof($SystemPermissions)>0) {
304 299
		$aPermissions = convertStringToKeyArray($SystemPermissions);
305
		$sTempPermissions = convertKeyArrayToString($aPermissions).',';
300
//		$sTempPermissions = convertKeyArrayToString($aPermissions).',';
301
		$sTempPermissions = implode(",", $aPermissions).',';
306 302
	}
307 303
// workout setting preferences
308 304
	if($admin->is_group_match('preferences_view',$sTempPermissions))
......
383 379
		{
384 380
	//		if(strpos($key,'_view')) { continue; }
385 381
		$checked='';
386
			if(array_key_exists($key, $aPermissions)) { 
387
			 continue; 
382
			if(array_key_exists($key, $aPermissions)) {
383
			 continue;
388 384
             }
389 385
			$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
390 386
			$tpl->set_var('SYS_VALUE', 1 );
......
400 396
		foreach($array AS $key => $value)
401 397
		{
402 398
		$checked='';
403
			if(strpos($key,'_view')) { 
404
			 continue; 
399
			if(strpos($key,'_view')) {
400
			 continue;
405 401
             }
406 402
			$tpl->set_var('SYS_NAME', "system_permissions[$key]" );
407 403
			$tpl->set_var('SYS_VALUE', 1 );
......
498 494
		}
499 495
	}
500 496
	return !$database->is_error();
501
}
497
}
branches/2.8.x/wb/admin/groups/save.inc.php
41 41
	// check for valid group_id
42 42
		$sql = '';
43 43

  
44
//		$system_settings = getSystemDefaultPermissions();
45
		$system_settings = isset($_POST['system_permissions']) ? $_POST['system_permissions'] : array();
44
		$aSystemPermissionsPages = (isset($_POST["sp_pages"])) ? $_POST["sp_pages"] : array();
45
		$aSystemPermissionsMedia = (isset($_POST["sp_media"])) ? $_POST["sp_media"] : array();
46
		$aSystemPermissionsModules = (isset($_POST["sp_modules"])) ? $_POST["sp_modules"] : array();
47
		$aSystemPermissionsTemplates = (isset($_POST["sp_templates"])) ? $_POST["sp_templates"] : array();
48
		$aSystemPermissionsLanguages = (isset($_POST["sp_languages"])) ? $_POST["sp_languages"] : array();
49
		$aSystemPermissionsSettings = (isset($_POST["sp_settings"])) ? $_POST["sp_settings"] : array();
50
		$aSystemPermissionsAdmintools = (isset($_POST["sp_admintools"])) ? $_POST["sp_admintools"] : array();
51
		$aSystemPermissionsUsers = (isset($_POST["sp_users"])) ? $_POST["sp_users"] : array();
52
		$aSystemPermissionsGroups = (isset($_POST["sp_groups"])) ? $_POST["sp_groups"] : array();
53
		$aSystemPermissionsPreferences = (isset($_POST["sp_preferences"])) ? $_POST["sp_preferences"] : array();
54
		$aSystemPermissions = array_merge($aSystemPermissionsPages, $aSystemPermissionsMedia, $aSystemPermissionsModules,
55
										$aSystemPermissionsTemplates, $aSystemPermissionsLanguages, $aSystemPermissionsSettings,
56
										$aSystemPermissionsAdmintools, $aSystemPermissionsUsers, $aSystemPermissionsGroups,
57
										$aSystemPermissionsPreferences);
46 58

  
59
		//addons,modules,modules_advanced,modules_install,modules_view,preferences,preferences_view
47 60
	// check FTAN and prevent 'admin'[id=1] from become changed
48 61
		if( $admin->checkFTAN() && $group_id != 1 )
49 62
		{
50
			$system_permissions   = get_system_permissions ($admin,$system_settings);
51
			$system_permissions   = set_system_permissions($system_permissions);
63
			$aSystemPermissions   = get_system_permissions ($admin,$aSystemPermissions);
64
			$sSystemPermissions   = set_system_permissions($aSystemPermissions);
52 65

  
53 66
			$module_permissions   = set_module_permissions($admin);
54 67
			$module_permissions   = implode (',', $module_permissions);
......
58 71

  
59 72
			// prepare empty record to add new group
60 73
			$group_name = $database->escapeString(strip_tags(trim($admin->get_post('name'))));
61
//	print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
62
//	print_r( $_POST ); print '</pre>';
63 74

  
64 75
			$sql  = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'groups` ';
65 76
			$sql .= 'WHERE `group_id` <> '.$group_id.' AND `name` LIKE BINARY \''.$group_name.'\'';
......
88 99
            if( msgQueue::isEmpty() )
89 100
			{
90 101
				$sql .= 'SET `name` = \''.$group_name.'\', ';
91
				$sql .= '`system_permissions` = \''.$system_permissions.'\', ';
102
				$sql .= '`system_permissions` = \''.$sSystemPermissions.'\', ';
92 103
				$sql .= '`module_permissions` = \''.$module_permissions.'\', ';
93 104
				$sql .= '`template_permissions` = \''.$template_permissions.'\' ';
94 105
				$sql .= $where;
......
104 115
		}
105 116
		$admin->print_header();
106 117
		return $group_id;
107
	}
118
	}
branches/2.8.x/wb/admin/skel/themes/htt/groups_form.htt
11 11
				 	<input type="text" name="name" maxlength="120" value="{GROUP_NAME}" class="c400{GROUPNAME_INPUT_DISABLED}"{GROUPNAME_DISABLED} />
12 12
				</div>
13 13
	<!-- BEGIN show_cmd_permission_block -->
14
				<div class="col_content">
15
					<input type="submit" name="{ACTION_HANDLE}" value="{SUBMIT_TITLE}" />
16
					<input type="submit" name="action_cancel" value="{TEXT_CANCEL}" />
17
					<input type="reset" name="reset" value="{TEXT_RESET}" />
18
				</div>
19 14
				<br class="clear ie-clearing none" />
20 15
		<!-- BEGIN show_cmd_manage_permission_block -->
21 16
				<div class="cleft col_width100">
......
27 22
						<div class="mbox curved h65 floatbox">
28 23
							<h4>{TEXT_FILESYSTEM_PERMISSIONS}</h4>
29 24
							<span>
30
								<input id="pages_view" type="checkbox" value="1" name="system_permissions[pages_view]" {pages_view_checked}  />
25
								<input id="pages_view" type="checkbox" value="1" name="_onlyJQ_pages" {pages_view_checked}  />
31 26
								<label for="pages_view">{MENU_PAGES}</label>
32 27
							</span>
33 28
							<span>
34
								<input id="media_view" type="checkbox" value="1" name="system_permissions[media_view]"  {media_view_checked}/>
29
								<input id="media_view" type="checkbox" value="1" name="_onlyJQ_media"  {media_view_checked}/>
35 30
								<label for="media_view">{MENU_MEDIA}</label>
36 31
							</span>
37 32
							<span>
38
								<input id="modules_view" type="checkbox" value="1" name="system_permissions[modules_view]" {modules_view_checked} />
33
								<input id="modules_view" type="checkbox" value="1" name="_onlyJQ_modules" {modules_view_checked} />
39 34
								<label for="modules_view">{MENU_MODULES}</label>
40 35
							</span>
41 36
							<span>
42
								<input id="templates_view" type="checkbox" value="1" name="system_permissions[templates_view]" {templates_view_checked} />
37
								<input id="templates_view" type="checkbox" value="1" name="_onlyJQ_templates" {templates_view_checked} />
43 38
								<label for="templates_view">{MENU_TEMPLATES}</label>
44 39
							</span>
45 40
							<span>
46
								<input id="languages_view" type="checkbox" value="1" name="system_permissions[languages_view]" {languages_view_checked} />
41
								<input id="languages_view" type="checkbox" value="1" name="_onlyJQ_languages" {languages_view_checked} />
47 42
								<label for="languages_view">{MENU_LANGUAGES}</label>
48 43
							</span>
49 44
							<span>
50
								<input id="settings_view" type="checkbox" value="1" name="system_permissions[settings_view]" {settings_view_checked} />
45
								<input id="settings_view" type="checkbox" value="1" name="_onlyJQ_settings" {settings_view_checked} />
51 46
								<label for="settings_view">{MENU_SETTINGS}</label>
52 47
							</span>
53 48
							<span>
54
								<input id="admintools_view" type="checkbox" value="1" name="system_permissions[admintools_view]" {admintools_view_checked} />
49
								<input id="admintools_view" type="checkbox" value="1" name="_onlyJQ_admintools" {admintools_view_checked} />
55 50
								<label for="admintools_view">{MENU_ADMINTOOLS}</label>
56 51
							</span>
57 52
							<span>
58
								<input id="users_view" type="checkbox" value="1" name="system_permissions[users_view]" {users_view_checked} />
53
								<input id="users_view" type="checkbox" value="1" name="_onlyJQ_users" {users_view_checked} />
59 54
								<label for="users_view">{MENU_USERS}</label>
60 55
							</span>
61 56
							<span>
62
								<input id="groups_view" type="checkbox" value="1" name="system_permissions[groups_view]" {groups_view_checked} />
57
								<input id="groups_view" type="checkbox" value="1" name="_onlyJQ_groups" {groups_view_checked} />
63 58
								<label for="groups_view">{MENU_GROUPS}</label>
64 59
							</span>
65 60
							<span>
66
								<input id="preferences_view" type="checkbox" value="1" name="system_permissions[preferences_view]" {preferences_view_checked}  />
61
								<input id="preferences_view" type="checkbox" value="1" name="_onlyJQ_preferences" {preferences_view_checked}  />
67 62
								<label for="preferences_view">{MENU_USER_PREFERENCES}</label>
68 63
							</span>
69 64
						</div>
......
80 75
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_PAGES}</h6>
81 76
							<ul>
82 77
								<li class="c100">
83
									<input name="system_permissions[pages_view]" id="pages_view_detail" type="checkbox" value="{VALUE}" {pages_view_checked} />
78
									<input name="sp_pages[]" id="pages_view_detail" type="checkbox" value="pages_view" {pages_view_checked} />
84 79
									<label for="pages_view_detail">{TEXT_VIEW}</label>
85 80
								</li>
86 81
								<li class="c100">
87
									<input name="system_permissions[pages_add_l0]" id="pages_add_l0" type="checkbox" value="{VALUE}" {pages_add_l0_checked} />
82
									<input name="sp_pages[]" id="pages_add_l0" type="checkbox" value="pages_add_l0" {pages_add_l0_checked} />
88 83
									<label for="pages_add_l0">{TEXT_ADD} ({TEXT_LEVEL} 0)</label>
89 84
								</li>
90 85
								<li class="c100">
91
									<input name="system_permissions[pages_add]" id="pages_add" type="checkbox" value="{VALUE}" {pages_add_checked} />
86
									<input name="sp_pages[]" id="pages_add" type="checkbox" value="pages_add" {pages_add_checked} />
92 87
									<label for="pages_add">{TEXT_ADD}</label>
93 88
								</li>
94 89
								<li class="c100">
95
									<input name="system_permissions[pages_settings]" id="pages_settings" type="checkbox" value="{VALUE}" {pages_settings_checked} />
90
									<input name="sp_pages[]" id="pages_settings" type="checkbox" value="pages_settings" {pages_settings_checked} />
96 91
									<label for="pages_settings">{TEXT_MODIFY_SETTINGS}</label>
97 92
								</li>
98 93
								<li class="c100">
99
									<input name="system_permissions[pages_modify]" id="pages_modify" type="checkbox" value="{VALUE}" {pages_modify_checked} />
94
									<input name="sp_pages[]" id="pages_modify" type="checkbox" value="pages_modify" {pages_modify_checked} />
100 95
									<label for="pages_modify">{TEXT_MODIFY_CONTENT}</label>
101 96
								</li>
102 97
								<li class="c100">
103
									<input name="system_permissions[pages_intro]" id="pages_intro" type="checkbox" value="{VALUE}" {pages_intro_checked} />
98
									<input name="sp_pages[]" id="pages_intro" type="checkbox" value="pages_intro" {pages_intro_checked} />
104 99
									<label for="pages_intro">{HEADING_MODIFY_INTRO_PAGE}</label>
105 100
								</li>
106 101
								<li class="c100">
107
									<input name="system_permissions[pages_delete]" id="pages_delete" type="checkbox" value="{VALUE}" {pages_delete_checked} />
102
									<input name="sp_pages[]" id="pages_delete" type="checkbox" value="pages_delete" {pages_delete_checked} />
108 103
									<label for="pages_delete">{TEXT_DELETE}</label>
109 104
								</li>
110 105
							</ul>
111 106
						</div>
112 107
					</div>
113 108
				</div>
114
				<div id="JQMediaView"class="cleft col_width33">
109
				<div id="JQMediaView" class="cleft col_width33">
115 110
					<div class="col_content">
116 111
						<div class="mbox curved min_h100 floatbox" style="height: 180px;">
117 112
							<h6>{TEXT_FILESYSTEM_PERMISSIONS} {MENU_MEDIA}</h6>
118 113
							<ul>
119 114
								<li class="c100">
120
								<input name="system_permissions[media_view]" id="media_view_detail" type="checkbox" value="1" {media_view_checked} />
115
								<input name="sp_media[]" id="media_view_detail" type="checkbox" value="media_view" {media_view_checked} />
121 116
								<label for="media_view_detail">{TEXT_VIEW}</label>
122 117
								</li>
123 118
								<li class="c100">
124
								<input name="system_permissions[media_upload]" id="media_upload" type="checkbox" value="1" {media_upload_checked} />
119
								<input name="sp_media[]" id="media_upload" type="checkbox" value="media_upload" {media_upload_checked} />
125 120
								<label for="media_upload">{TEXT_UPLOAD_FILES}</label>
126 121
								</li>
127 122
								<li class="c100">
128
								<input name="system_permissions[media_rename]" id="media_rename" type="checkbox" value="1" {media_rename_checked} />
123
								<input name="sp_media[]" id="media_rename" type="checkbox" value="media_rename" {media_rename_checked} />
129 124
								<label for="media_rename">{TEXT_RENAME}</label>
130 125
								</li>
131 126
								<li class="c100">
132
								<input name="system_permissions[media_delete]" id="media_delete" type="checkbox" value="1" {media_delete_checked} />
127
								<input name="sp_media[]" id="media_delete" type="checkbox" value="media_delete" {media_delete_checked} />
133 128
								<label for="media_delete">{TEXT_DELETE}</label>
134 129
								</li>
135 130
								<li class="c100">
136
								<input name="system_permissions[media_create]" id="media_create" type="checkbox" value="1" {media_create_checked} />
131
								<input name="sp_media[]" id="media_create" type="checkbox" value="media_create" {media_create_checked} />
137 132
								<label  for="media_create">{TEXT_CREATE_FOLDER}</label>
138 133
								</li>
139 134
								<li class="c100">
......
149 144
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_MODULES}</h6>
150 145
							<ul>
151 146
								<li class="c100">
152
								<input name="system_permissions[modules_view]" id="modules_view_detail" type="checkbox" value="1" {modules_view_checked} />
147
								<input name="sp_modules[]" id="modules_view_detail" type="checkbox" value="modules_view" {modules_view_checked} />
153 148
								<label for="modules_view_detail">{TEXT_VIEW}</label>
154 149
								</li>
155 150
								<li class="c100">
156
								<input name="system_permissions[modules_install]" id="modules_install" type="checkbox" value="1" {modules_install_checked} />
151
								<input name="sp_modules[]" id="modules_install" type="checkbox" value="modules_install" {modules_install_checked} />
157 152
								<label for="modules_install">{TEXT_ADD}</label>
158 153
								</li>
159 154
								<li class="c100">
160
								<input name="system_permissions[modules_uninstall]" id="modules_uninstall" type="checkbox" value="1" {modules_uninstall_checked} />
155
								<input name="sp_modules[]" id="modules_uninstall" type="checkbox" value="modules_uninstall" {modules_uninstall_checked} />
161 156
								<label for="modules_uninstall">{TEXT_DELETE}</label>
162 157
								</li>
163 158
								<li class="c100">
164
								<input name="system_permissions[modules_advanced]" id="modules_advanced" type="checkbox" value="1" {modules_advanced_checked} />
159
								<input name="sp_modules[]" id="modules_advanced" type="checkbox" value="modules_advanced" {modules_advanced_checked} />
165 160
								<label for="modules_advanced">{TEXT_ADVANCED}</label>
166 161
								</li>
167 162
							</ul>
......
175 170
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_TEMPLATES}</h6>
176 171
							<ul>
177 172
								<li class="c100">
178
									<input name="system_permissions[templates_view]" id="templates_view_detail" type="checkbox" value="1" {templates_view_checked} />
173
									<input name="sp_templates[]" id="templates_view_detail" type="checkbox" value="templates_view" {templates_view_checked} />
179 174
									<label for="templates_view_detail">{TEXT_VIEW}</label>
180 175
								</li>
181 176
								<li class="c100">
182
									<input name="system_permissions[templates_install]" id="templates_install" type="checkbox" value="1" {templates_install_checked} />
177
									<input name="sp_templates[]" id="templates_install" type="checkbox" value="templates_install" {templates_install_checked} />
183 178
									<label for="templates_install">{TEXT_ADD}</label>
184 179
								</li>
185 180
								<li class="c100">
186
									<input name="system_permissions[templates_uninstall]" id="templates_uninstall" type="checkbox" value="1" {templates_uninstall_checked} />
181
									<input name="sp_templates[]" id="templates_uninstall" type="checkbox" value="templates_uninstall" {templates_uninstall_checked} />
187 182
									<label for="templates_uninstall">{TEXT_DELETE}</label>
188 183
								</li>
189 184
								<li class="c100" style="line-height: 2em;">&nbsp;</li>
......
197 192
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_LANGUAGES}</h6>
198 193
							<ul>
199 194
								<li class="c100">
200
									<input name="system_permissions[languages_view]" id="languages_view_detail" type="checkbox" value="1" {languages_view_checked} />
195
									<input name="sp_languages[]" id="languages_view_detail" type="checkbox" value="languages_view" {languages_view_checked} />
201 196
									<label for="languages_view_detail">{TEXT_VIEW}</label>
202 197
								</li>
203 198
								<li class="c100">
204
									<input name="system_permissions[languages_install]" id="languages_install" type="checkbox" value="1" {languages_install_checked} />
199
									<input name="sp_languages[]" id="languages_install" type="checkbox" value="languages_install" {languages_install_checked} />
205 200
									<label for="languages_install">{TEXT_ADD}</label>
206 201
								</li>
207 202
								<li class="c100">
208
									<input name="system_permissions[languages_uninstall]" id="languages_uninstall" type="checkbox" value="1" {languages_uninstall_checked} />
203
									<input name="sp_languages[]" id="languages_uninstall" type="checkbox" value="languages_uninstall" {languages_uninstall_checked} />
209 204
									<label for="languages_uninstall">{TEXT_DELETE}</label>
210 205
								</li>
211 206
								<li class="c100" style="line-height: 2em;">&nbsp;</li>
......
219 214
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_SETTINGS}</h6>
220 215
							<ul>
221 216
								<li class="c100">
222
									<input name="system_permissions[settings_view]" id="settings_view_detail" type="checkbox" value="1" {settings_view_checked} />
217
									<input name="sp_settings[]" id="settings_view_detail" type="checkbox" value="settings_view" {settings_view_checked} />
223 218
									<label for="settings_view_detail">{TEXT_BASIC}</label>
224 219
								</li>
225 220
								<li class="c100">
226
									<input name="system_permissions[settings_advanced]" id="settings_advanced" type="checkbox" value="1" {settings_advanced_checked} />
221
									<input name="sp_settings[]" id="settings_advanced" type="checkbox" value="settings_advanced" {settings_advanced_checked} />
227 222
									<label for="settings_advanced">{TEXT_ADVANCED}</label>
228 223
								</li>
229 224
							</ul>
......
237 232
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_ADMINTOOLS}</h6>
238 233
							<ul>
239 234
								<li class="c100">
240
									<input name="system_permissions[admintools_view]" id="admintools_view_detail" type="checkbox" value="1" {admintools_view_checked} />
235
									<input name="sp_admintools[]" id="admintools_view_detail" type="checkbox" value="admintools_view" {admintools_view_checked} />
241 236
									<label for="admintools_view_detail">{TEXT_MODIFY}</label>
242 237
								</li>
243 238
							</ul>
......
250 245
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_USERS}</h6>
251 246
							<ul>
252 247
								<li class="c100">
253
									<input name="system_permissions[users_view]" id="users_view_detail" type="checkbox" value="1" {users_view_checked} />
248
									<input name="sp_users[]" id="users_view_detail" type="checkbox" value="users_view" {users_view_checked} />
254 249
									<label for="users_view_detail">{TEXT_VIEW}</label>
255 250
								</li>
256 251
								<li class="c100">
257
									<input name="system_permissions[users_add]" id="users_add" type="checkbox" value="1" {users_add_checked} />
252
									<input name="sp_users[]" id="users_add" type="checkbox" value="users_add" {users_add_checked} />
258 253
									<label for="users_add">{TEXT_ADD}</label>
259 254
								</li>
260 255
								<li class="c100">
261
									<input name="system_permissions[users_modify]" id="users_modify" type="checkbox" value="1" {users_modify_checked} />
256
									<input name="sp_users[]" id="users_modify" type="checkbox" value="users_modify" {users_modify_checked} />
262 257
									<label for="users_modify">{TEXT_MODIFY}</label>
263 258
								</li>
264 259
								<li class="c100">
265
									<input name="system_permissions[users_delete]" id="users_delete" type="checkbox" value="1" {users_delete_checked} />
260
									<input name="sp_users[]" id="users_delete" type="checkbox" value="users_delete" {users_delete_checked} />
266 261
									<label for="users_delete">{TEXT_DELETE}</label>
267 262
								</li>
268 263
							</ul>
......
275 270
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_GROUPS}</h6>
276 271
							<ul>
277 272
								<li class="c100">
278
									<input name="system_permissions[groups_view]" id="groups_view_detail" type="checkbox" value="1" {groups_view_checked} />
273
									<input name="sp_groups[]" id="groups_view_detail" type="checkbox" value="groups_view" {groups_view_checked} />
279 274
									<label for="groups_view_detail">{TEXT_VIEW}</label>
280 275
								</li>
281 276
								<li class="c100">
282
									<input name="system_permissions[groups_add]" id="groups_add" type="checkbox" value="1" {groups_add_checked} />
277
									<input name="sp_groups[]" id="groups_add" type="checkbox" value="groups_add" {groups_add_checked} />
283 278
									<label for="groups_add">{TEXT_ADD}</label>
284 279
								</li>
285 280
								<li class="c100">
286
									<input name="system_permissions[groups_modify]" id="groups_modify" type="checkbox" value="1" {groups_modify_checked} />
281
									<input name="sp_groups[]" id="groups_modify" type="checkbox" value="groups_modify" {groups_modify_checked} />
287 282
									<label for="groups_modify">{TEXT_MODIFY}</label>
288 283
								</li>
289 284
								<li class="c100">
290
									<input name="system_permissions[groups_delete]" id="groups_delete" type="checkbox" value="1" {groups_delete_checked} />
285
									<input name="sp_groups[]" id="groups_delete" type="checkbox" value="groups_delete" {groups_delete_checked} />
291 286
									<label for="groups_delete">{TEXT_DELETE}</label>
292 287
								</li>
293 288
							</ul>
......
301 296
							<h6>{FILESYSTEM_PERMISSIONS} {MENU_USER_PREFERENCES}</h6>
302 297
							<ul>
303 298
								<li class="c100">
304
									<input name="system_permissions[preferences_view]" id="preferences_view_detail" type="checkbox" value="1" {preferences_view_checked} />
299
									<input name="sp_preferences[]" id="preferences_view_detail" type="checkbox" value="preferences_view" {preferences_view_checked} />
305 300
									<label for="preferences_view_detail">{TEXT_MODIFY}</label>
306 301
								</li>
307 302
							</ul>
......
370 365
				</div>
371 366
				<hr class="clear" />
372 367
				<div class="col_content">
373
					<input type="submit" name="{ACTION_HANDLE}" value="{SUBMIT_TITLE}" />
368
					<input type="submit" name="{ACTION_HANDLE}" value="{SUBMIT_TITLE}" id="TESTID"/>
374 369
					<input type="submit" name="action_cancel" value="{TEXT_CANCEL}" />
375 370
					<input type="reset" name="reset" value="{TEXT_RESET}" />
376 371
				</div>
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1942');
54
if(!defined('REVISION')) define('REVISION', '1943');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/templates/wb_theme/jquery/jquery-plugins.js
28 28
    }
29 29

  
30 30
    /* toggler for group permissions */
31
    if($('form[name="group"]').length) {
32

  
33
        function toggleBox(checkbox, toggleID)
34
        {
35
            var $checkbox = checkbox;
36
            if( $checkbox.attr('checked'))
37
            {
38
                $(toggleID).removeClass("hide");
39
                return true;
40
            } else {
41
                $(toggleID).addClass("hide");
42
                return false;
43
            }
44
        }
45

  
46
        function proveCheckbox(checkbox)
47
        {
48
            if($(checkbox).attr('checked'))
49
            {
50
                $(checkbox).prop('checked', false);
51
            } else {
52
                $(checkbox).prop('checked', true);
53
            }
54
        }
55

  
56
        var $ischecked = false;
57
        /* check toggler on pageload */
58
        if($ischecked == false) {
59
            if(!$('#pages_view').attr('checked')){
60
                toggleBox($(this), "#JQPageView");
61
            }
62
            if(!$('#media_view').attr('checked')){
63
                toggleBox($(this), "#JQMediaView");
64
            }
65
            if(!$('#modules_view').attr('checked')){
66
                toggleBox($(this), "#JQModulesView");
67
            }
68
            if(!$('#templates_view').attr('checked')){
69
                toggleBox($(this), "#JQTemplateView");
70
            }
71
            if(!$('#languages_view').attr('checked')){
72
                toggleBox($(this), "#JQLanguagesView");
73
            }
74
            if(!$('#settings_view').attr('checked')){
75
                toggleBox($(this), "#JQSettingsView");
76
            }
77
            if(!$('#admintools_view').attr('checked')){
78
                toggleBox($(this), "#JQAToolsView");
79
            }
80
            if(!$('#users_view').attr('checked')){
81
                toggleBox($(this), "#JQUsersView");
82
            }
83
            if(!$('#groups_view').attr('checked')){
84
                toggleBox($(this), "#JQGroupsView");
85
            }
86
            var $ischecked = true;
87
        }
88

  
89

  
90
        $('#pages_view').click(function(){
91
            if(toggleBox($(this),"#JQPageView")){proveCheckbox("#pages_view_detail")}else{proveCheckbox("#pages_view_detail");proveCheckbox("#pages_add_l0");proveCheckbox("#pages_add");proveCheckbox("#pages_settings");proveCheckbox("#pages_modify");proveCheckbox("#pages_intro");proveCheckbox("#pages_delete")};
92
        });
93
        $('#media_view').click(function(){
94
            if(toggleBox($(this),"#JQMediaView")){proveCheckbox("#media_view_detail")}else{proveCheckbox("#media_view_detail");proveCheckbox("#media_upload");proveCheckbox("#media_rename");proveCheckbox("#media_delete");proveCheckbox("#media_create")};
95
        });
96
        $('#modules_view').click(function(){
97
            if(toggleBox($(this),"#JQModulesView")){proveCheckbox("#modules_view_detail")}else{proveCheckbox("#modules_view_detail");proveCheckbox("#modules_install");proveCheckbox("#modules_uninstall");proveCheckbox("#modules_advanced")};
98
        });
99
        $('#templates_view').click(function(){
100
            if(toggleBox($(this),"#JQTemplateView")){proveCheckbox("#templates_view_detail")}else{proveCheckbox("#templates_view_detail");proveCheckbox("#templates_install");proveCheckbox("#templates_uninstall")};
101
        });
102
        $('#languages_view').click(function(){
103
            if(toggleBox($(this),"#JQLanguagesView")){proveCheckbox("#languages_view_detail")}else{proveCheckbox("#languages_view_detail");proveCheckbox("#languages_install");proveCheckbox("#languages_uninstall")};
104
        });
105
        $('#settings_view').click(function(){
106
            if(toggleBox($(this),"#JQSettingsView")){proveCheckbox("#settings_view_detail")}else{proveCheckbox("#settings_view_detail");proveCheckbox("#settings_advanced")};
107
        });
108
        $('#admintools_view').click(function(){
109
            if(toggleBox($(this),"#JQAToolsView")){proveCheckbox("#admintools_view_detail")}else{proveCheckbox("#admintools_view_detail")};
110
        });
111
        $('#users_view').click(function(){
112
            if(toggleBox($(this),"#JQUsersView")){proveCheckbox("#users_view_detail")}else{proveCheckbox("#users_view_detail");proveCheckbox("#users_add");proveCheckbox("#users_modify");proveCheckbox("#users_delete")};
113
        });
114
        $('#groups_view').click(function(){
115
            if(toggleBox($(this),"#JQGroupsView")){proveCheckbox("#groups_view_detail")}else{proveCheckbox("#groups_view_detail");proveCheckbox("#groups_add");proveCheckbox("#groups_modify");proveCheckbox("#groups_delete")};
116
        });
117
        $('#preferences_view').click(function(){
118
            if(toggleBox($(this),"#JQUSettingsView")){proveCheckbox("#preferences_view_detail")}else{proveCheckbox("#preferences_view_detail")};
119
        });
31
    if ($('form[name="group"]').length) {
32
		function toggleBox(a,b){var c=a;if(c.attr("checked")){$(b).removeClass("hide");return true}else{$(b).addClass("hide");return false}}var $ischecked=false;if($ischecked==false){if(!$("#pages_view").attr("checked")){toggleBox($(this),"#JQPageView")}if(!$("#media_view").attr("checked")){toggleBox($(this),"#JQMediaView")}if(!$("#modules_view").attr("checked")){toggleBox($(this),"#JQModulesView")}if(!$("#templates_view").attr("checked")){toggleBox($(this),"#JQTemplateView")}if(!$("#languages_view").attr("checked")){toggleBox($(this),"#JQLanguagesView")}if(!$("#settings_view").attr("checked")){toggleBox($(this),"#JQSettingsView")}if(!$("#admintools_view").attr("checked")){toggleBox($(this),"#JQAToolsView")}if(!$("#users_view").attr("checked")){toggleBox($(this),"#JQUsersView")}if(!$("#groups_view").attr("checked")){toggleBox($(this),"#JQGroupsView")}var $ischecked=true}$("#pages_view").click(function(){if(toggleBox($(this),"#JQPageView")){$("#pages_view_detail").attr("checked",true)}else{$.each(["#pages_view_detail","#pages_add_l0","#pages_add","#pages_settings","#pages_modify","#pages_intro","#pages_delete"],function(b,a){$(a).removeAttr("checked")})}});$("#media_view").click(function(){if(toggleBox($(this),"#JQMediaView")){$("#media_view_detail").attr("checked",true)}else{$.each(["#media_view_detail","#media_upload","#media_rename","#media_delete","#media_create"],function(b,a){$(a).removeAttr("checked")})}});$("#modules_view").click(function(){if(toggleBox($(this),"#JQModulesView")){$("#modules_view_detail").attr("checked",true)}else{$.each(["#modules_view_detail","#modules_install","#modules_uninstall","#modules_advanced"],function(b,a){$(a).removeAttr("checked")})}});$("#templates_view").click(function(){if(toggleBox($(this),"#JQTemplateView")){$("#templates_view_detail").attr("checked",true)}else{$.each(["#templates_view_detail","#templates_install","#templates_uninstall"],function(b,a){$(a).removeAttr("checked")})}});$("#languages_view").click(function(){if(toggleBox($(this),"#JQLanguagesView")){$("#languages_view_detail").attr("checked",true)}else{$.each(["#languages_view_detail","#languages_install","#languages_uninstall"],function(b,a){$(a).removeAttr("checked")})}});$("#settings_view").click(function(){if(toggleBox($(this),"#JQSettingsView")){$("#settings_view_detail").attr("checked",true)}else{$.each(["#settings_view_detail","#settings_advanced"],function(b,a){$(a).removeAttr("checked")})}});$("#admintools_view").click(function(){if(toggleBox($(this),"#JQAToolsView")){$("#admintools_view_detail").attr("checked",true)}else{$.each(["#modules_view_detail","#modules_install","#modules_uninstall","#modules_advanced"],function(b,a){$(a).removeAttr("checked")})}});$("#users_view").click(function(){if(toggleBox($(this),"#JQUsersView")){$("#users_view_detail").attr("checked",true)}else{$.each(["#users_view_detail","#users_add","#users_modify","#users_delete"],function(b,a){$(a).removeAttr("checked")})}});$("#groups_view").click(function(){if(toggleBox($(this),"#JQGroupsView")){$("#groups_view_detail").attr("checked",true)}else{$.each(["#groups_view_detail","#groups_add","#groups_modify","#groups_delete"],function(b,a){$(a).removeAttr("checked")})}});$("#preferences_view").click(function(){if(toggleBox($(this),"#JQUSettingsView")){$("#preferences_view_detail").attr("checked",true)}else{$.each(["#preferences_view_detail"],function(b,a){$(a).removeAttr("checked")})}});
120 33
    }
121 34
});

Also available in: Unified diff