Changeset 1609:51d77265fb5a for admin/user.php
- Timestamp:
- 08/28/13 19:15:41 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/user.php
r1605 r1609 192 192 } 193 193 194 echo 195 '<form action="user.php" method="post" id="user-form" class="fieldset">'. 196 '<div class="two-cols">'. 197 198 '<div class="col">'. 199 '<h3>'.__('User profile').'</h3>'. 200 201 '<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('User ID:').'</label> '. 202 form::field('user_id',20,255,html::escapeHTML($user_id)). 203 '</p>'. 204 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'; 205 194 206 if ($user_id == $core->auth->userID()) { 195 207 echo … … 199 211 200 212 echo 201 '<form action="user.php" method="post" id="user-form">'.202 '<fieldset><legend>'.__('User information').'</legend>'.203 '<div class="two-cols">'.204 '<div class="col">'.205 '<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('User ID:').'</label> '.206 form::field('user_id',20,255,html::escapeHTML($user_id)).207 '</p>'.208 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'.209 210 213 '<p><label for="new_pwd" '.($user_id != '' ? '' : 'class="required"').'>'. 211 214 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> '). … … 218 221 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').'</label> '. 219 222 form::password('new_pwd_c',20,255). 220 '</p>'.221 222 '<p><label for="user_name">'.__('Last Name:').'</label> '.223 form::field('user_name',20,255,html::escapeHTML($user_name)).224 '</p>'.225 226 '<p><label for="user_firstname">'.__('First Name:').'</label> '.227 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).228 '</p>'.229 230 '<p><label for="user_displayname">'.__('Display name:').'</label> '.231 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).232 '</p>'.233 234 '<p><label for="user_email">'.__('Email:').'</label> '.235 form::field('user_email',20,255,html::escapeHTML($user_email)).236 '</p>'.237 '<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'.238 '</div>'.239 240 '<div class="col">'.241 '<p><label for="user_url">'.__('URL:').'</label> '.242 form::field('user_url',30,255,html::escapeHTML($user_url)).243 '</p>'.244 '<p><label for="user_post_format">'.__('Preferred format:').'</label> '.245 form::combo('user_post_format',$formaters_combo,$user_options['post_format']).246 '</p>'.247 248 '<p><label for="user_post_status">'.__('Default entry status:').'</label> '.249 form::combo('user_post_status',$status_combo,$user_post_status).250 '</p>'.251 252 '<p><label for="user_edit_size">'.__('Entry edit field height:').'</label> '.253 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).254 '</p>'.255 256 '<p><label for="user_lang">'.__('User language:').'</label> '.257 form::combo('user_lang',$lang_combo,$user_lang,'l10n').258 '</p>'.259 260 '<p><label for="user_tz">'.__('User timezone:').'</label> '.261 form::combo('user_tz',dt::getZones(true,true),$user_tz).262 223 '</p>'; 263 224 … … 270 231 271 232 $super_disabled = $user_super && $user_id == $core->auth->userID(); 272 273 233 echo 274 234 '<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'','',$super_disabled).' '. 275 235 __('Super administrator').'</label></p>'. 236 237 '<p><label for="user_name">'.__('Last Name:').'</label> '. 238 form::field('user_name',20,255,html::escapeHTML($user_name)). 239 '</p>'. 240 241 '<p><label for="user_firstname">'.__('First Name:').'</label> '. 242 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 243 '</p>'. 244 245 '<p><label for="user_displayname">'.__('Display name:').'</label> '. 246 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 247 '</p>'. 248 249 '<p><label for="user_email">'.__('Email:').'</label> '. 250 form::field('user_email',20,255,html::escapeHTML($user_email)). 251 '</p>'. 252 '<p class="form-note">'.__('Mandatory for password recovering procedure.').'</p>'. 253 254 '<p><label for="user_url">'.__('URL:').'</label> '. 255 form::field('user_url',30,255,html::escapeHTML($user_url)). 256 '</p>'. 276 257 '</div>'. 277 '</div>'. 278 '</fieldset>'; 258 259 '<div class="col">'. 260 '<h3>'.__('Options').'</h3>'. 261 '<h4>'.__('Interface').'</h4>'. 262 '<p><label for="user_lang">'.__('Language:').'</label> '. 263 form::combo('user_lang',$lang_combo,$user_lang,'l10n'). 264 '</p>'. 265 266 '<p><label for="user_tz">'.__('Timezone:').'</label> '. 267 form::combo('user_tz',dt::getZones(true,true),$user_tz). 268 '</p>'. 269 270 '<h4>'.__('Edition').'</h4>'. 271 '<p><label for="user_post_format">'.__('Preferred format:').'</label> '. 272 form::combo('user_post_format',$formaters_combo,$user_options['post_format']). 273 '</p>'. 274 275 '<p><label for="user_post_status">'.__('Default entry status:').'</label> '. 276 form::combo('user_post_status',$status_combo,$user_post_status). 277 '</p>'. 278 279 '<p><label for="user_edit_size">'.__('Entry edit field height:').'</label> '. 280 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']). 281 '</p>'; 279 282 280 283 # --BEHAVIOR-- adminUserForm 281 284 $core->callBehavior('adminUserForm',isset($rs) ? $rs : null); 282 285 286 echo 287 '</div>'. 288 '</div>'; 289 290 283 291 echo 284 '<p ><label for="your_pwd" '.($user_id != '' ? '' : 'class="required"').'>'.285 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Your password:').'</label>'.292 '<p class="clear border-top"><label for="your_pwd" class="required">'. 293 '<abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label>'. 286 294 form::password('your_pwd',20,255).'</p>'. 287 295 '<p class="clear"><input type="submit" name="save" accesskey="s" value="'.__('Save').'" />'. … … 295 303 if ($user_id) 296 304 { 297 echo '<div class="clear fieldset"><h3>'.__('Permissions').'</h3>'. 298 '<form action="users_actions.php" method="post">'. 299 '<p><input type="submit" value="'.__('Add new permissions').'" />'. 300 form::hidden(array('redir'),'user.php?id='.$user_id). 301 form::hidden(array('action'),'blogs'). 302 form::hidden(array('users[]'),$user_id). 303 $core->formNonce(). 304 '</p>'. 305 '</form>'; 306 307 $permissions = $core->getUserPermissions($user_id); 308 $perm_types = $core->auth->getPermissionsTypes(); 309 310 if (count($permissions) == 0) 305 echo '<div class="clear fieldset">'. 306 '<h3>'.__('Permissions').'</h3>'; 307 308 if (!$user_super) 311 309 { 312 echo '<p>'.__('No permissions.').'</p>'; 313 } 314 else 315 { 316 foreach ($permissions as $k => $v) 310 echo 311 '<form action="users_actions.php" method="post">'. 312 '<p><input type="submit" value="'.__('Add new permissions').'" />'. 313 form::hidden(array('redir'),'user.php?id='.$user_id). 314 form::hidden(array('action'),'blogs'). 315 form::hidden(array('users[]'),$user_id). 316 $core->formNonce(). 317 '</p>'. 318 '</form>'; 319 320 $permissions = $core->getUserPermissions($user_id); 321 $perm_types = $core->auth->getPermissionsTypes(); 322 323 if (count($permissions) == 0) 317 324 { 318 if (count($v['p']) > 0) 325 echo '<p>'.__('No permissions so far.').'</p>'; 326 } 327 else 328 { 329 foreach ($permissions as $k => $v) 319 330 { 320 echo 321 '<form action="users_actions.php" method="post">'. 322 '<h4><a href="blog.php?id='.html::escapeHTML($k).'">'. 323 html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</h4>'; 324 325 echo '<ul>'; 326 foreach ($v['p'] as $p => $V) { 327 if (isset($perm_types[$p])) { 328 echo '<li>'.__($perm_types[$p]).'</li>'; 331 if (count($v['p']) > 0) 332 { 333 echo 334 '<form action="users_actions.php" method="post">'. 335 '<p class="blog-perm">'.__('Blog:').' <a href="blog.php?id='.html::escapeHTML($k).'">'. 336 html::escapeHTML($v['name']).'</a> ('.html::escapeHTML($k).')</p>'; 337 338 echo '<ul class="ul-perm">'; 339 foreach ($v['p'] as $p => $V) { 340 if (isset($perm_types[$p])) { 341 echo '<li>'.__($perm_types[$p]).'</li>'; 342 } 329 343 } 344 echo 345 '</ul>'. 346 '<p class="add-perm"><input type="submit" class="reset" value="'.__('Change permissions').'" />'. 347 form::hidden(array('redir'),'user.php?id='.$user_id). 348 form::hidden(array('action'),'perms'). 349 form::hidden(array('users[]'),$user_id). 350 form::hidden(array('blogs[]'),$k). 351 $core->formNonce(). 352 '</p>'. 353 '</form>'; 330 354 } 331 echo '</ul>'. 332 '<p><input type="submit" value="'.__('Change permissions').'" />'. 333 form::hidden(array('redir'),'user.php?id='.$user_id). 334 form::hidden(array('action'),'perms'). 335 form::hidden(array('users[]'),$user_id). 336 form::hidden(array('blogs[]'),$k). 337 $core->formNonce(). 338 '</p>'. 339 '</form>'; 340 } 341 } 342 } 343 355 } 356 } 357 358 } 359 else { 360 echo '<p>'.sprintf(__('User %s is super admin.'),$user_id).'</p>'; 361 } 344 362 echo '</div>'; 345 363 }
Note: See TracChangeset
for help on using the changeset viewer.