Changeset 497 for trunk/services/admins.php
- Timestamp:
- Sep 15, 2014 9:44:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/admins.php
r479 r497 34 34 require_once 'codebase/lib/FormValidator.inc.php'; 35 35 require_once 'codebase/lib/SortOrder.inc.php'; 36 require_once 'codebase/lib/ TemplateGlue.inc.php';36 require_once 'codebase/lib/HTML.inc.php'; 37 37 require_once 'codebase/lib/Prefs.inc.php'; 38 38 require_once 'codebase/lib/Lock.inc.php'; … … 229 229 } 230 230 231 $fv->numericRange('admin_id', -32768, 32767, _("<strong>Admin id</strong> must be a valid number between -32768and 32767."));231 $fv->numericRange('admin_id', 0, 32767, _("<strong>Admin id</strong> must be a valid number between 0 and 32767.")); 232 232 233 233 $fv->isEmpty('username', _("<strong>Username</strong> cannot be blank.")); … … 235 235 236 236 $fv->isEmpty('userpass', _("<strong>Passwords</strong> cannot be blank.")); 237 $fv->stringLength('userpass', 6, 36, _("<strong>Passwords</strong> must be between 6and 36 characters long."));237 $fv->stringLength('userpass', 8, 36, _("<strong>Passwords</strong> must be between 8 and 36 characters long.")); 238 238 239 239 $fv->stringLength('first_name', 0, 255, _("<strong>First name</strong> must contain less than 256 characters.")); … … 242 242 243 243 $fv->isEmpty('email', _("<strong>Email</strong> cannot be blank.")); 244 $fv->stringLength('email', 0, 255, _("<strong>Email</strong> must contain less than 256 characters."));245 244 $fv->validateEmail('email'); 246 245 } … … 267 266 'new_op' => 'insert', 268 267 'submit_buttons' => array( 269 'submit' => _("Add Administrator"),270 'repeat' => _("Add & repeat"),271 'cancel' => _("Cancel"),268 array('name' => 'submit', 'value' => _("Add Administrator"), 'class' => 'small button', 'accesskey' => 's'), 269 array('name' => 'repeat', 'value' => _("Add & repeat"), 'class' => 'small button secondary', 'accesskey' => 'r'), 270 array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), 272 271 ), 273 272 ); … … 280 279 global $auth; 281 280 global $lock; 281 global $locally_carried_queries; 282 282 $app =& App::getInstance(); 283 283 $db =& DB::getInstance(); … … 324 324 'old_username' => $frm['username'], 325 325 'submit_buttons' => array( 326 'submit' => _("Save changes"),327 'repeat' => _("Save & edit next"),328 'reset' => _("Reset"),329 'cancel' => _("Cancel"),326 array('name' => 'submit', 'value' => _("Save changes"), 'class' => 'small button', 'accesskey' => 's'), 327 array('name' => 'repeat', 'value' => _("Save & edit next"), 'class' => 'small button secondary', 'accesskey' => 'e'), 328 array('name' => 'reset', 'value' => _("Reset"), 'class' => 'small button secondary', 'accesskey' => 'r'), 329 array('name' => 'cancel', 'value' => _("Cancel"), 'class' => 'small button secondary', 'accesskey' => 'c'), 330 330 ), 331 ), $frm, array('userpass' => ' ****************'));331 ), $frm, array('userpass' => 'â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢')); 332 332 333 333 return $frm; … … 339 339 global $lock; 340 340 global $cache; 341 global $locally_carried_queries; 341 342 $app =& App::getInstance(); 342 343 $db =& DB::getInstance(); … … 367 368 if ($num_admins <= 1) { 368 369 // There must always be at least one admnistrator! 369 $app->raiseMsg(_("You cannot delete the only administrator in the database. There must be at least one to log in and create other users."), MSG_NOTICE, __FILE__, __LINE__);370 $app->raiseMsg(_("You cannot delete the only user in the database. There must be at least one to log in and create other users."), MSG_NOTICE, __FILE__, __LINE__); 370 371 } else if ($auth->get('user_id') == $id) { 371 372 // Do not delete yourself! … … 418 419 $version->create($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $last_insert_id, $frm['username']); 419 420 420 $app->raiseMsg(sprintf(_("The Administrator <em>%s</em> has been added."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__);421 $app->raiseMsg(sprintf(_("The user <em>%s</em> has been added."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); 421 422 422 423 return $last_insert_id; … … 461 462 $version->create($auth->getParam('db_table'), $auth->getParam('db_primary_key'), $frm['admin_id'], $frm['username']); 462 463 463 $app->raiseMsg(sprintf(_("The Administrator <em>%s</em> has been updated."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__);464 $app->raiseMsg(sprintf(_("The user <em>%s</em> has been updated."), $frm['username']), MSG_SUCCESS, __FILE__, __LINE__); 464 465 465 466 // Unlock record.
Note: See TracChangeset
for help on using the changeset viewer.