diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index 6c309e63fcb..e8181b628f6 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -21,40 +21,36 @@
*/
require("./pre.inc.php");
+$langs->trans("admin");
+
+
if (!$user->admin)
accessforbidden();
llxHeader();
-print_titre("Boites");
+print_titre($langs->trans("Boxes"));
-print "
";
-print "Les boites sont des cartouches d'informations réduites qui s'affichent sur certaines pages. Vous pouvez choisir ou non d'activer ces cartouches en cliquant sur 'Ajouter' ou la poubelle pour les désactiver. ";
-print "Seules les boites en rapport avec un module actif sont présentées.
\n";
+print "
".$langs->trans("BoxesDesc")."
\n";
if ($_POST["action"] == 'add')
{
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position) values (".$_POST["rowid"].",".$_POST["constvalue"].");";
-
+ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes WHERE box_id=".$_POST["boxid"]." AND position=".$_POST["pos"];
$result = $db->query($sql);
+
+ $num = $db->num_rows();
+ if ($num == 0) {
+ // Si la boite n'est pas deja active
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position) values (".$_POST["boxid"].",".$_POST["pos"].");";
+ $result = $db->query($sql);
+ }
}
-if ($_GET["action"] == 'add')
-{
-
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position) values (".$_GET["rowid"].",0);";
-
- $result = $db->query($sql);
-}
-
-
if ($_GET["action"] == 'delete')
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE rowid=".$_GET["rowid"];
-
$result = $db->query($sql);
}
@@ -96,16 +92,15 @@ $db->free();
* Boites disponibles
*
*/
-print '
';
-print_titre("Boites disponibles");
+print "
\n";
+print_titre($langs->trans("BoxesAvailable"));
-print '
';
+print '';
print '';
-print '| Boites | ';
-print 'Fichier source | ';
-foreach ($pos_array as $position) {
- print 'Activation '.$pos_name[$position].' | ';
-}
+print ''.$langs->trans("Boxe").' | ';
+print ''.$langs->trans("SourceFile").' | ';
+print ''.$langs->trans("ActivateOn").' | ';
+print ' | ';
print "
\n";
$sql = "SELECT rowid, name, file FROM ".MAIN_DB_PREFIX."boxes_def";
@@ -117,29 +112,29 @@ if ($result)
$num = $db->num_rows();
$i = 0;
+ // Boucle sur toutes les boites
while ($i < $num)
{
$var = ! $var;
$obj = $db->fetch_object( $i);
- print '| '.$obj->name.' | ' . $obj->file . ' | ';
+ print '';
$i++;
}
@@ -149,14 +144,15 @@ $db->free();
print '
';
-print "
\n";
-print_titre("Boites activées");
+print "
\n\n";
+print_titre($langs->trans("BoxesActivated"));
print '';
print '';
-print '| Boites | ';
-print 'Active pour | ';
-print 'Désactiver | ';
+print ''.$langs->trans("Boxe").' | ';
+print ' | ';
+print ''.$langs->trans("ActiveOn").' | ';
+print ''.$langs->trans("Disable").' | ';
print "
\n";
$sql = "SELECT b.rowid, b.box_id, b.position, d.name FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as d where b.box_id = d.rowid";
@@ -172,9 +168,14 @@ if ($result)
$var = ! $var;
$obj = $db->fetch_object( $i);
- print '| '.$obj->name.' | ' . $pos_name[$obj->position] . ' | ';
+ print ' |
| '.$obj->name.' | ';
+ print ' | ';
+ print '' . $pos_name[$obj->position] . ' | ';
+ print '';
print ''.img_delete().'';
- print ' |
';
+ print '';
+
+ print "\n";
$i++;
}
}
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index 14d80bb04c4..22b44b43e08 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -64,9 +64,34 @@ print ''.$langs->trans("Action").' | ';
print "\n";
-# Affiche lignes des constantes
$form = new Form($db);
+
+# Affiche ligne d'ajout
+$var=!$var;
+print '';
+
+
+# Affiche lignes des constantes
if ($all==1){
$sql = "SELECT rowid, name, value, type, note FROM llx_const ORDER BY name ASC";
}else{
@@ -128,31 +153,6 @@ if ($result)
}
-# Affiche ligne d'ajout
-$var=!$var;
-print '
';
$db->close();
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index a345f8349a2..7cd6e608459 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -104,7 +104,7 @@ llxHeader();
if ($_GET["id"])
{
- print_titre("Configuration des dictionnaires de données");
+ print_titre($langs->trans("DictionnarySetup"));
print '
';
// Complète requete recherche valeurs avec critere de tri
@@ -208,7 +208,7 @@ if ($_GET["id"])
}
else
{
- print_titre("Configuration des dictionnaires de données");
+ print_titre($langs->trans("DictionnarySetup"));
print '
';
foreach ($tabid as $i => $value) {
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index f08d2c07d75..d002c31e657 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -46,7 +46,7 @@ if (!defined("MAIN_MOTD") && strlen(trim(MAIN_MOTD)))
define("MAIN_MOTD","");
}
-print_titre("Configuration IHM (Dolibarr version ".DOL_VERSION.")");
+print_titre($langs->trans("GUISetup"));
print "
\n";
diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index 91fbc46b1cf..ee8470acdcd 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -33,7 +33,7 @@ if ($_POST["action"] == 'update')
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
- dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
+ dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
Header("Location: index.php");
}
@@ -42,7 +42,8 @@ if ($_POST["action"] == 'update')
llxHeader();
$form = new Form($db);
-print_titre("Configuration générale (Dolibarr version ".DOL_VERSION.")");
+print_titre($langs->trans("GlobalSetup"));
+
print "
\n";
@@ -71,7 +72,7 @@ if ($_GET["action"] == 'edit')
print '';
print '| Code de l\'activité économique | ';
- print ' |
';
+ print '';
print '| ';
print ' |
';
@@ -81,7 +82,7 @@ else
{
print '';
- print '| Informations sur la société/association | Valeur |
';
+ print '| Informations sur la société/association | '.$langs->trans("Value").' |
';
print '| Nom de la société/association | ' . MAIN_INFO_SOCIETE_NOM . ' |
';
print '| Pays de la société | ';
@@ -96,8 +97,8 @@ else
print ' |
| Identifiant professionnel (SIREN,...) | ';
print MAIN_INFO_SIREN . ' |
';
- print '| RCS | ';
- print MAIN_INFO_RCS . ' |
';
+ print '| Code de l\'activité économique | ';
+ print MAIN_INFO_APE . ' |
';
print '
';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 4837cbc9ba6..31d3966ed00 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -103,20 +103,18 @@ if (!$user->admin)
exit;
}
-print_titre("Modules");
+print_titre($langs->trans("Modules"));
-print '
';
-print 'Les modules Dolibarr définissent les fonctionnalités disponibles dans l\'application.
';
-print 'Certains modules nécessitent des droits qu\'il vous faudra affecter aux utilisateurs pour qu\'ils puissent accéder à ces fonctionnalités.
';
+print "
".$langs->trans("ModulesDesc")."
\n";
print '
';
print '';
print '';
-print '| Famille | ';
-print 'Module | ';
-print 'Info | ';
-print 'Actif | ';
-print 'Action | ';
+print ''.$langs->trans("Family").' | ';
+print ''.$langs->trans("Module").' | ';
+print ''.$langs->trans("Description").' | ';
+print ''.$langs->trans("Activated").' | ';
+print ''.$langs->trans("Action").' | ';
print ' | ';
print "
\n";
@@ -160,13 +158,13 @@ asort($orders);
$var=True;
$familylib=array(
-'crm'=>'Gestion client (CRM)',
-'products'=>'Gestion produits',
-'hr'=>'Ressources humaines',
-'projects'=>'Projets/Travail collaboratif',
-'other'=>'Autre',
-'technic'=>'Modules techniques, interfaces',
-'financial'=>'Modules financiers (Compta/trésorerie)'
+'crm'=>$langs->trans("ModuleFamilyCrm"),
+'products'=>$langs->trans("ModuleFamilyProducts"),
+'hr'=>$langs->trans("ModuleFamilyHr"),
+'projects'=>$langs->trans("ModuleFamilyProjects"),
+'other'=>$langs->trans("ModuleFamilyOther"),
+'technic'=>$langs->trans("ModuleFamilyTechnic"),
+'financial'=>$langs->trans("ModuleFamilyFinancial")
);
foreach ($orders as $key => $value)
{
@@ -211,7 +209,7 @@ foreach ($orders as $key => $value)
if ($const_value == 1)
{
- print 'Désactiver';
+ print ''.$langs->trans("Disable").'';
if ($objMod->config_page_url)
@@ -221,11 +219,11 @@ foreach ($orders as $key => $value)
$i=0;
foreach ($objMod->config_page_url as $page) {
if ($i++) { print ''.ucfirst($page).' '; }
- else { print 'Configurer '; }
+ else { print ''.$langs->trans("Setup").' '; }
}
print '';
} else {
- print 'Configurer | ';
+ print ''.$langs->trans("Setup").' | ';
}
}
else
@@ -236,7 +234,7 @@ foreach ($orders as $key => $value)
}
else
{
- print 'Activer | ';
+ print ''.$langs->trans("Activate").' | ';
}
print '';
diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php
index 4368d955457..3373c6711c6 100644
--- a/htdocs/admin/perms.php
+++ b/htdocs/admin/perms.php
@@ -21,9 +21,13 @@
*/
require("./pre.inc.php");
+$langs->load("users");
+
+
if (!$user->admin)
accessforbidden();
+
if ($_GET["action"] == 'add')
{
$sql = "UPDATE ".MAIN_DB_PREFIX."rights_def SET bydefault=1 WHERE id =".$_GET["pid"];
@@ -38,7 +42,10 @@ if ($_GET["action"] == 'remove')
llxHeader();
-print_titre("Permissions par défaut");
+print_titre($langs->trans("DefaultRights"));
+
+print "
".$langs->trans("DefaultRightsDesc")."
\n";
+
print '