diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 9f87259cbec..ab0a6e027ed 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * * 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 @@ -51,7 +51,20 @@ if ($_GET["action"] == 'remove') llxHeader(); -print_fiche_titre($langs->trans("DefaultRights")); + +$h = 0; + +$head[$h][0] = DOL_URL_ROOT."/admin/perms.php"; +$head[$h][1] = $langs->trans("DefaultRights"); +$hselected=$h; +$h++; + +$head[$h][0] = DOL_URL_ROOT."/admin/security.php"; +$head[$h][1] = $langs->trans("Passwords"); +$h++; + + +dolibarr_fiche_head($head, $hselected, $langs->trans("Security")); print $langs->trans("DefaultRightsDesc")."

\n"; @@ -157,7 +170,8 @@ if ($result) } print ''; -print '
'; + +print ''; $db->close(); diff --git a/htdocs/admin/pre.inc.php b/htdocs/admin/pre.inc.php index 2cc012bfe4e..eb2d3fa3fc9 100644 --- a/htdocs/admin/pre.inc.php +++ b/htdocs/admin/pre.inc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Simon Tosser * * This program is free software; you can redistribute it and/or modify @@ -54,7 +54,7 @@ function llxHeader($head = "", $title="", $help_url='') $menu->add(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers")); - $menu->add(DOL_URL_ROOT."/admin/perms.php", $langs->trans("DefaultRights")); + $menu->add(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security")); $menu->add(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup")); diff --git a/htdocs/user/admin/index.php b/htdocs/admin/security.php similarity index 75% rename from htdocs/user/admin/index.php rename to htdocs/admin/security.php index 3640d93e246..a96f494effe 100644 --- a/htdocs/user/admin/index.php +++ b/htdocs/admin/security.php @@ -1,6 +1,5 @@ - * Copyright (C) 2004-2005 Laurent Destailleur +/* Copyright (C) 2004-2006 Laurent Destailleur * * 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 @@ -21,7 +20,7 @@ */ /** - \file htdocs/user/admin/index.php + \file htdocs/admin/security.php \ingroup setup \brief Page de configuration du module sécurité \version $Revision$ @@ -35,7 +34,9 @@ $langs->load("admin"); if (!$user->admin) accessforbidden(); - +/* + * Actions + */ if ($_POST["action"] == 'update' || $_POST["action"] == 'add') { if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'')) @@ -50,21 +51,33 @@ if ($_POST["action"] == 'update' || $_POST["action"] == 'add') } + + llxHeader(); + +$h = 0; + +$head[$h][0] = DOL_URL_ROOT."/admin/perms.php"; +$head[$h][1] = $langs->trans("DefaultRights"); +$h++; + +$head[$h][0] = DOL_URL_ROOT."/admin/security.php"; +$head[$h][1] = $langs->trans("Passwords"); +$hselected=$h; +$h++; + +dolibarr_fiche_head($head, $hselected, $langs->trans("Security")); + + $var=false; $form = new Form($db); $typeconst=array('yesno','texte','chaine'); -print_titre($langs->trans("UserSetup")); - -print "
"; - print ''; print ''; -print ''; -print ''; +print ''; print "\n"; print ''; @@ -72,24 +85,20 @@ print ''; print ''; print ''; -print '\n"; +print ''; print '\n"; +print ''; + print ''; print "
'.$langs->trans("Parameter").''.$langs->trans("Value").''.$langs->trans("Description").' '.$langs->trans("Parameter").''.$langs->trans("Value").'
USER_PASSWORD_GENERATED
'.$langs->trans("GeneratePassword").''; $form->selectyesnonum('constvalue',USER_PASSWORD_GENERATED); -print ''; - -print ''; -print ''; -print '   '; print "
\n"; - - +print ''; llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index f17dd453158..d81e90cd1bc 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -124,7 +124,7 @@ class MenuLeft { if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("DelaysBeforeWarning")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers")); - if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("DefaultRights")); + if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup")); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b3e225fc4aa..ea88baa7413 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -319,7 +319,7 @@ DelaysOfToleranceTransactionsToConciliate=Tol DelaysOfToleranceMembers=Tolérance de retard avant alerte (en jours) sur cotisations adhérents en retard ##### Users setup ##### UserGroupSetup=Users and groups module setup -GeneratePassword=Générer mot de passe +GeneratePassword=Suggest a generated password ##### Company setup ##### CompanySetup=Companies module setup CustomerCodeChecker=Module for checking customer's code diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 6660b68d5d7..14e9f904f9b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -319,7 +319,7 @@ DelaysOfToleranceTransactionsToConciliate=Tol DelaysOfToleranceMembers=Tolérance de retard avant alerte (en jours) sur cotisations adhérents en retard ##### Users setup ##### UserGroupSetup=Configuration module utilisateurs et groupes -GeneratePassword=Générer mot de passe +GeneratePassword=Proposer un mot de passe généré ##### Company setup ##### CompanySetup=Configuration du module Sociétés CustomerCodeChecker=Module de contrôle des codes clients diff --git a/htdocs/user/admin/pre.inc.php b/htdocs/user/admin/pre.inc.php deleted file mode 100644 index 5f673164b97..00000000000 --- a/htdocs/user/admin/pre.inc.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Copyright (C) 2005 Laurent Destailleur - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ - */ - -/** - \file htdocs/user/pre.inc.php - \brief Gestionnaire menu fichier users - \version $Revision$ -*/ - -require("../../main.inc.php"); - -function llxHeader($head = "", $title = "") -{ - global $user,$langs; - - /* - * - * - */ - top_menu($head, $title); - - $menu = new Menu(); - - $menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("Users")); - - $menu->add_submenu(DOL_URL_ROOT."/user/", $langs->trans("List")); - - if($user->admin) - { - $menu->add_submenu(DOL_URL_ROOT."/user/fiche.php?&action=create", $langs->trans("NewUser")); - } - - $menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("Groups")); - - $menu->add_submenu(DOL_URL_ROOT."/user/group/", $langs->trans("List")); - - if($user->admin) - { - $menu->add_submenu(DOL_URL_ROOT."/user/group/fiche.php?&action=create", $langs->trans("NewGroup")); - } - - - left_menu($menu->liste); -} - -?> diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index b4e2b7079f6..3e900063fc5 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Regis Houssin * Copyright (C) 2005 Lionel COUSTEIX @@ -312,8 +312,13 @@ if ($action == 'create') print ''.$langs->trans("Login").''; print ''; + $generated_password=''; + if ($conf->global->USER_PASSWORD_GENERATED) + { + $generated_passowrd=''; + } print ''.$langs->trans("Password").''; - print ''; + print ''; if ($user->admin) { diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 2553283a78e..c2409418b5a 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2006 Laurent Destailleur * * 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 @@ -36,11 +36,12 @@ if (! $user->rights->user->user->lire && !$user->admin) $langs->load("users"); + llxHeader(); $lien=""; -if ($user->admin) $lien=''.img_picto($langs->trans("Setup"),"setup").' '.$langs->trans("Setup").''; +if ($user->admin) $lien=''.img_picto($langs->trans("Setup"),"setup").' '.$langs->trans("Setup").''; print_fiche_titre($langs->trans("MenuUsersAndGroups"),$lien); @@ -49,11 +50,7 @@ print ''; print '
'; - - -/* - * Recherche User - */ +// Recherche User $var=false; print '
'; print ''; @@ -64,9 +61,7 @@ print '
'.$langs->trans("Other").':
\n"; print ''; -/* - * Recherche Group - */ +// Recherche Group $var=false; print '
'; print '';