diff --git a/dev/tools/test/testdiv.php b/dev/tools/test/testdiv.php
index 5b57f0a3667..b529af4eb60 100644
--- a/dev/tools/test/testdiv.php
+++ b/dev/tools/test/testdiv.php
@@ -39,8 +39,8 @@
-
';
?>
-
+
trans("ExportMethod"); ?>
@@ -179,7 +179,7 @@ print '';
-
+
diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php
index 24cef75d53c..9f8af14f2b9 100644
--- a/htdocs/admin/tools/dolibarr_import.php
+++ b/htdocs/admin/tools/dolibarr_import.php
@@ -86,7 +86,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'
';
trans("DatabaseName").' :
'.$dolibarr_main_db_name.' '; ?>
-
+
use_javascript_ajax) { ?>
@@ -120,7 +120,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).' ';
-
+
diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php
index d0d3c117be6..c1224bffe89 100644
--- a/htdocs/admin/triggers.php
+++ b/htdocs/admin/triggers.php
@@ -67,9 +67,9 @@ foreach ($triggers as $trigger)
$var=!$var;
print '
';
print ''.$trigger['picto'].' ';
- print ''.$trigger['file'].' ';
+ print ''.$trigger['file'].' ';
print ''.$trigger['status'].' ';
- print '';
+ print ' ';
$text=$trigger['info'];
$text.=" \n".$langs->trans("File")." : \n".$trigger['relpath'];
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index bef65d409a3..b89dbf291b7 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -44,7 +44,7 @@ $userid=GETPOST("userid","int");
$position=GETPOST("position","int");
$backtopage=GETPOST('backtopage','alpha');
-$bookmark=new Bookmark($db);
+$object=new Bookmark($db);
/*
@@ -69,14 +69,14 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
exit;
}
- if ($action == 'update') $bookmark->fetch(GETPOST("id",'int'));
+ if ($action == 'update') $object->fetch(GETPOST("id",'int'));
// Check if null because user not admin can't set an user and send empty value here.
if(!empty($userid))
- $bookmark->fk_user=$userid;
- $bookmark->title=$title;
- $bookmark->url=$url;
- $bookmark->target=$target;
- $bookmark->position=$position;
+ $object->fk_user=$userid;
+ $object->title=$title;
+ $object->url=$url;
+ $object->target=$target;
+ $object->position=$position;
if (! $title) {
$error++;
@@ -90,10 +90,10 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
if (! $error)
{
- $bookmark->favicon='none';
+ $object->favicon='none';
- if ($action == 'update') $res=$bookmark->update();
- else $res=$bookmark->create();
+ if ($action == 'update') $res=$object->update();
+ else $res=$object->create();
if ($res > 0)
{
@@ -103,14 +103,14 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
}
else
{
- if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
+ if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$langs->load("errors");
setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings');
}
else
{
- setEventMessages($bookmark->error, $bookmark->errors, 'errors');
+ setEventMessages($object->error, $object->errors, 'errors');
}
$action = $invertedaction;
}
@@ -133,7 +133,7 @@ $form=new Form($db);
$head = array();
$h=1;
-$head[$h][0] = $_SERVER["PHP_SELF"].($bookmark->id?'id='.$bookmark->id:'');
+$head[$h][0] = $_SERVER["PHP_SELF"].($object->id?'id='.$object->id:'');
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
@@ -157,7 +157,7 @@ if ($action == 'create')
print '';
@@ -193,8 +193,9 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
/*
* Fact bookmark mode or visually edition
*/
- $bookmark->fetch($id);
-
+ $object->fetch($id);
+
+ $hselected = 'card';
$head = array(
array(
'',
@@ -208,18 +209,22 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
print ' ';
// Description
- print '
'.$langs->trans("Description").' ';
+ print ' '.$langs->trans("Description").' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$description,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,'90%');
$doleditor->Create();
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index da0f1c73d12..3c4568ae70e 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -49,8 +49,10 @@ class Categorie extends CommonObject
const TYPE_MEMBER = 3; // TODO Replace this value with 'member'
const TYPE_CONTACT = 4; // TODO Replace this value with 'contact'
const TYPE_USER = 4; // categorie contact and user are same ! TODO Replace this value with 'user'
- const TYPE_ACCOUNT = 5; // for bank account TODO Replace this value with 'account'
- const TYPE_PROJECT = 6;
+ const TYPE_ACCOUNT = 5; // for bank account TODO Replace this value with 'account'
+ const TYPE_PROJECT = 6;
+ public $picto = 'category';
+
/**
* @var array ID mapping from type string
@@ -205,6 +207,7 @@ class Categorie extends CommonObject
$res = $this->db->fetch_array($resql);
$this->id = $res['rowid'];
+ //$this->ref = $res['rowid'];
$this->fk_parent = $res['fk_parent'];
$this->label = $res['label'];
$this->description = $res['description'];
@@ -1703,6 +1706,18 @@ class Categorie extends CommonObject
}
}
+ /**
+ * Return label of contact status
+ *
+ * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
+ * @return string Label of contact status
+ */
+ function getLibStatut($mode)
+ {
+ return '';
+ }
+
+
/**
* Initialise an instance with random values.
* Used to build previews or test instances.
diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php
index 6da030db893..ee03f9f4771 100644
--- a/htdocs/categories/photos.php
+++ b/htdocs/categories/photos.php
@@ -36,8 +36,6 @@ $langs->load("categories");
$langs->load("bills");
-$mesg = '';
-
$id=GETPOST('id','int');
$ref=GETPOST('ref');
$type=GETPOST('type');
@@ -105,33 +103,38 @@ if ($object->id)
else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
- dol_fiche_head($head, 'photos', $title, 0, 'category');
+
+ dol_fiche_head($head, 'photos', $title, 0, 'category');
+
+ $linkback = ''.$langs->trans("BackToList").' ';
+
+ $object->ref = $object->label;
+ $morehtmlref=''.$langs->trans("Root").' >> ';
+ $ways = $object->print_all_ways(" >> ", '', 1);
+ foreach ($ways as $way)
+ {
+ $morehtmlref.=$way."
\n";
+ }
+ $morehtmlref.='
';
+
+ dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
+
/*
* Confirmation de la suppression de photo
*/
if ($action == 'delete')
{
- print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
}
- print($mesg);
-
+ print ' ';
+
+ print '
';
print '';
- // Path of category
- print '';
- $ways = $object->print_all_ways(" >> ", '', 1);
- print $langs->trans("Ref").' ';
- print ''.$langs->trans("Root").' >> ';
- foreach ($ways as $way)
- {
- print $way." \n";
- }
- print ' ';
-
// Description
- print '';
+ print ' ';
print $langs->trans("Description").' ';
print dol_htmlentitiesbr($object->description);
print ' ';
@@ -144,7 +147,7 @@ if ($object->id)
print "
\n";
- print "\n";
+ print dol_fiche_end();
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index 1967727b32f..a239b357045 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -1,7 +1,7 @@
* Copyright (C) 2007 Rodolphe Quiedeville
- * Copyright (C) 2010-2012 Destailleur Laurent
+ * Copyright (C) 2010-2016 Destailleur Laurent
* Copyright (C) 2015 Raphaël Doursenaud
*
* This program is free software; you can redistribute it and/or modify
@@ -156,25 +156,40 @@ elseif ($type == Categorie::TYPE_PROJECT) $title=$langs->trans("ProjectsCatego
else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
+
+// Calculate $cnt_trans
+$cnt_trans = 0;
+if (! empty($object->multilangs))
+{
+ foreach ($object->multilangs as $key => $value)
+ {
+ $cnt_trans++;
+ }
+}
+
dol_fiche_head($head, 'translation', $title, 0, 'category');
+$linkback = ''.$langs->trans("BackToList").' ';
+
+$object->ref = $object->label;
+$morehtmlref=''.$langs->trans("Root").' >> ';
+$ways = $object->print_all_ways(" >> ", '', 1);
+foreach ($ways as $way)
+{
+ $morehtmlref.=$way."
\n";
+}
+$morehtmlref.='
';
+
+dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
+
+print ' ';
+
+print '
';
+
print '';
-// Reference
-print '';
-print '';
-$ways = $object->print_all_ways(" >> ", '', 1);
-print $langs->trans("Ref").' ';
-print ''.$langs->trans("Root").' >> ';
-foreach ($ways as $way)
-{
- print $way." \n";
-}
-print ' ';
-print ' ';
-
// Description
-print '';
+print ' ';
print $langs->trans("Description").' ';
print dol_htmlentitiesbr($object->description);
print ' ';
@@ -187,6 +202,32 @@ print '';
print '
';
+dol_fiche_end();
+
+
+
+
+/* ************************************************************************** */
+/* */
+/* Barre d'action */
+/* */
+/* ************************************************************************** */
+
+print "\n\n";
+
+
+
if ($action == 'edit')
{
//WYSIWYG Editor
@@ -201,9 +242,9 @@ if ($action == 'edit')
{
foreach ($object->multilangs as $key => $value)
{
- print "".$langs->trans('Language_'.$key)." : ";
+ print "".$langs->trans('Language_'.$key)." : ";
print '';
- print ''.$langs->trans('Label').' ';
+ print ''.$langs->trans('Label').' ';
print ''.$langs->trans('Description').' ';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3,'90%');
$doleditor->Create();
@@ -213,7 +254,9 @@ if ($action == 'edit')
print '
';
}
}
-
+
+ print ' ';
+
print '';
print '
';
print ' ';
@@ -223,46 +266,29 @@ if ($action == 'edit')
print '';
}
-else
+else if ($action != 'add')
{
- $cnt_trans = 0;
- if (! empty($object->multilangs))
+ if ($cnt_trans) print '
';
+
+ if (! empty($object->multilangs))
{
foreach ($object->multilangs as $key => $value)
{
- $cnt_trans++;
- $s=picto_from_langcode($key);
- print "
".($s?$s.' ':'')."
".$langs->trans('Language_'.$key).": ";
+ $s=picto_from_langcode($key);
print '
';
- print ' ';
- print ''.$langs->trans('Description').' '.$object->multilangs[$key]["description"].' ';
- print ''.$langs->trans('Note').' '.$object->multilangs[$key]["note"].' ';
+ print ''.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '').' ';
+ print ''.$langs->trans('Label').' '.$object->multilangs[$key]["label"].' ';
+ print ''.$langs->trans('Description').' '.$object->multilangs[$key]["description"].' ';
+ if (! empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION))
+ {
+ print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') '.$object->multilangs[$key]["other"].' ';
+ }
print '
';
}
}
- if (! $cnt_trans) print '
'. $langs->trans('NoTranslation');
+ if (! $cnt_trans && $action != 'add') print '
'. $langs->trans('NoTranslation').'
';
}
-print "
\n";
-
-
-/* ************************************************************************** */
-/* */
-/* Barre d'action */
-/* */
-/* ************************************************************************** */
-
-print "\n\n";
-
/*
* Form to add a new translation
@@ -280,11 +306,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print ' ';
print '';
- print ''.$langs->trans('Translation').' ';
+ print ' '.$langs->trans('Translation').' ';
print $formadmin->select_language('','forcelangprod',0,$object->multilangs);
print ' ';
print ''.$langs->trans('Label').' ';
- print ''.$langs->trans('Description').' ';
+ print ' '.$langs->trans('Description').' ';
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3,'90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index ed836cbccbb..a1c33c568f3 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -68,6 +68,7 @@ $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('categorycard'));
+
/*
* Actions
*/
@@ -190,8 +191,22 @@ else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
+
dol_fiche_head($head, 'card', $title, 0, 'category');
+$linkback = ''.$langs->trans("BackToList").' ';
+
+$object->ref = $object->label;
+$morehtmlref=''.$langs->trans("Root").' >> ';
+$ways = $object->print_all_ways(" >> ", '', 1);
+foreach ($ways as $way)
+{
+ $morehtmlref.=$way."
\n";
+}
+$morehtmlref.='
';
+
+dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
+
/*
* Confirmation suppression
@@ -202,21 +217,13 @@ if ($action == 'delete')
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 1);
}
+print ' ';
+
+print '
';
print '';
-// Path of category
-print '';
-$ways = $object->print_all_ways(" >> ", '', 1);
-print $langs->trans("Ref").' ';
-print ''.$langs->trans("Root").' >> ';
-foreach ($ways as $way)
-{
- print $way." \n";
-}
-print ' ';
-
// Description
-print '';
+print ' ';
print $langs->trans("Description").' ';
print dol_htmlentitiesbr($object->description);
print ' ';
@@ -359,7 +366,7 @@ if ($object->type == Categorie::TYPE_PRODUCT)
print '';
print $prod->getNomUrl(1);
print " \n";
- print ''.$prod->label." \n";
+ print ''.$prod->label." \n";
// Link to delete from category
print '';
$typeid=$object->type;
@@ -520,8 +527,8 @@ if ($object->type == Categorie::TYPE_MEMBER)
$member->ref=$member->login;
print $member->getNomUrl(1,0);
print " \n";
- print ''.$member->lastname." \n";
- print ''.$member->firstname." \n";
+ print ''.$member->lastname." \n";
+ print ''.$member->firstname." \n";
// Link to delete from category
print '';
$typeid=$object->type;
@@ -628,8 +635,8 @@ if ($object->type == Categorie::TYPE_ACCOUNT)
print ' ';
print $account->getNomUrl(1,0);
print " \n";
- print ''.$account->bank." \n";
- print ''.$account->number." \n";
+ print ''.$account->bank." \n";
+ print ''.$account->number." \n";
// Link to delete from category
print '';
$typeid=$object->type;
@@ -683,8 +690,8 @@ if ($object->type == Categorie::TYPE_PROJECT)
print ' ';
print $project->getNomUrl(1,0);
print " \n";
- print ''.$project->ref." \n";
- print ''.$project->title." \n";
+ print ''.$project->ref." \n";
+ print ''.$project->title." \n";
// Link to delete from category
print '';
$typeid=$object->type;
diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php
index bdfb7af6600..72e2dbadff4 100644
--- a/htdocs/comm/address.php
+++ b/htdocs/comm/address.php
@@ -253,7 +253,7 @@ if ($action == 'create')
print ' '.$langs->trans('Label').' ';
print ''.$langs->trans('Name').' ';
- print ''.$langs->trans('Address').'
-trans("NoteNotVisibleOnBill"); ?>
+ trans("NoteNotVisibleOnBill"); ?>
textarea_note; ?>
diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php
index 822cb03a6e0..686ad7217b7 100644
--- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php
@@ -90,7 +90,7 @@ dol_htmloutput_errors($object->error,$object->errors);
volume_units; ?>
-trans("NoteNotVisibleOnBill"); ?>
+ trans("NoteNotVisibleOnBill"); ?>
textarea_note; ?>
diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php
index 93114e573f8..771005781cd 100644
--- a/htdocs/product/canvas/product/tpl/card_view.tpl.php
+++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php
@@ -53,7 +53,7 @@ $object=$GLOBALS['object'];
-trans("Description"); ?>
+trans("Description"); ?>
description; ?>
@@ -83,7 +83,7 @@ $object=$GLOBALS['object'];
-trans("Note"); ?>
+trans("Note"); ?>
note; ?>
diff --git a/htdocs/product/canvas/service/tpl/card_create.tpl.php b/htdocs/product/canvas/service/tpl/card_create.tpl.php
index 39c91695f8f..e25f69d8848 100644
--- a/htdocs/product/canvas/service/tpl/card_create.tpl.php
+++ b/htdocs/product/canvas/service/tpl/card_create.tpl.php
@@ -63,7 +63,7 @@ $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSe
duration_unit; ?>
-trans("NoteNotVisibleOnBill"); ?>
+ trans("NoteNotVisibleOnBill"); ?>
textarea_note; ?>
diff --git a/htdocs/product/canvas/service/tpl/card_edit.tpl.php b/htdocs/product/canvas/service/tpl/card_edit.tpl.php
index fd403e647c6..27348b7820d 100644
--- a/htdocs/product/canvas/service/tpl/card_edit.tpl.php
+++ b/htdocs/product/canvas/service/tpl/card_edit.tpl.php
@@ -62,7 +62,7 @@ dol_htmloutput_errors($object->error,$object->errors);
duration_unit; ?>
-trans("NoteNotVisibleOnBill"); ?>
+ trans("NoteNotVisibleOnBill"); ?>
textarea_note; ?>
diff --git a/htdocs/product/canvas/service/tpl/card_view.tpl.php b/htdocs/product/canvas/service/tpl/card_view.tpl.php
index 5a53835109a..fd5d9ad73bf 100644
--- a/htdocs/product/canvas/service/tpl/card_view.tpl.php
+++ b/htdocs/product/canvas/service/tpl/card_view.tpl.php
@@ -53,7 +53,7 @@ $object=$GLOBALS['object'];
-trans("Description"); ?>
+trans("Description"); ?>
description; ?>
@@ -63,7 +63,7 @@ $object=$GLOBALS['object'];
-trans("Note"); ?>
+trans("Note"); ?>
note; ?>
diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php
index 8add246afa2..e05013cbe77 100644
--- a/htdocs/product/stock/fiche-valo.php
+++ b/htdocs/product/stock/fiche-valo.php
@@ -71,7 +71,7 @@ if ($_GET["id"])
print ''.$langs->trans("LocationSummary").' '.$entrepot->lieu.' ';
// Description
- print ''.$langs->trans("Description").' '.nl2br($entrepot->description).' ';
+ print ''.$langs->trans("Description").' '.nl2br($entrepot->description).' ';
print ''.$langs->trans('Address').' ';
print $entrepot->address;
@@ -90,12 +90,12 @@ if ($_GET["id"])
$calcproducts=$entrepot->nb_products();
// Nb of products
- print ' '.$langs->trans("NumberOfProducts").' ';
+ print ' '.$langs->trans("NumberOfProducts").' ';
print empty($calcproducts['nb'])?'0':$calcproducts['nb'];
print " ";
// Value
- print ''.$langs->trans("EstimatedStockValueShort").' ';
+ print ' '.$langs->trans("EstimatedStockValueShort").' ';
print empty($calcproducts['value'])?'0':$calcproducts['value'];
print " ";
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index f616004db42..e7986fde074 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -187,90 +187,24 @@ $titre=$langs->trans("CardProduct".$object->type);
$picto=($object->type==Product::TYPE_SERVICE?'service':'product');
-if ($action == 'edit')
+// Calculate $cnt_trans
+$cnt_trans = 0;
+if (! empty($object->multilangs))
{
- //WYSIWYG Editor
- require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
-
- print '';
- print ' ';
- print ' ';
- print ' ';
-
- dol_fiche_head($head, 'translation', $titre, 0, $picto);
-
- $linkback = ''.$langs->trans("BackToList").' ';
-
- dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
-
- if (! empty($object->multilangs))
- {
- foreach ($object->multilangs as $key => $value)
- {
- $s=picto_from_langcode($key);
- print " ".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '')." ";
-
- print '';
- print ''.$langs->trans('Label').' ';
- print ''.$langs->trans('Description').' ';
- $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
- $doleditor->Create();
- print ' ';
- if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION))
- {
- print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') ';
- $doleditor = new DolEditor("other-$key", $object->multilangs[$key]["other"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
- $doleditor->Create();
- }
- print ' ';
- print '
';
- }
- }
-
- dol_fiche_end();
-
- print '';
- print ' ';
- print ' ';
- print ' ';
- print '
';
-
- print ' ';
-
+ foreach ($object->multilangs as $key => $value)
+ {
+ $cnt_trans++;
+ }
}
-else
-{
- dol_fiche_head($head, 'translation', $titre, 0, $picto);
-
- $linkback = ''.$langs->trans("BackToList").' ';
-
- dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
-
- print '
';
-
-
- $cnt_trans = 0;
- if (! empty($object->multilangs))
- {
- foreach ($object->multilangs as $key => $value)
- {
- $cnt_trans++;
- $s=picto_from_langcode($key);
- print '';
- print ''.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '').' ';
- print ''.$langs->trans('Label').' '.$object->multilangs[$key]["label"].' ';
- print ''.$langs->trans('Description').' '.$object->multilangs[$key]["description"].' ';
- if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION))
- {
- print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') '.$object->multilangs[$key]["other"].' ';
- }
- print '
';
- }
- }
- if (! $cnt_trans) print ' '. $langs->trans('NoTranslation');
- dol_fiche_end();
-}
+
+dol_fiche_head($head, 'translation', $titre, 0, $picto);
+
+$linkback = ''.$langs->trans("BackToList").' ';
+
+dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', '', '', 0, '', '', 1);
+
+dol_fiche_end();
@@ -283,15 +217,86 @@ else
print "\n\n";
+
+if ($action == 'edit')
+{
+ //WYSIWYG Editor
+ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+
+ print '';
+ print ' ';
+ print ' ';
+ print ' ';
+
+ if (! empty($object->multilangs))
+ {
+ foreach ($object->multilangs as $key => $value)
+ {
+ $s=picto_from_langcode($key);
+ print " ".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '')." ";
+
+ print '';
+ print ''.$langs->trans('Label').' ';
+ print ''.$langs->trans('Description').' ';
+ $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor->Create();
+ print ' ';
+ if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION))
+ {
+ print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') ';
+ $doleditor = new DolEditor("other-$key", $object->multilangs[$key]["other"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
+ $doleditor->Create();
+ }
+ print ' ';
+ print '
';
+ }
+ }
+
+ print '';
+ print ' ';
+ print ' ';
+ print ' ';
+ print '
';
+
+ print ' ';
+
+}
+else if ($action != 'add')
+{
+ if ($cnt_trans) print '
';
+
+ if (! empty($object->multilangs))
+ {
+ foreach ($object->multilangs as $key => $value)
+ {
+ $s=picto_from_langcode($key);
+ print '';
+ print ''.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '').' ';
+ print ''.$langs->trans('Label').' '.$object->multilangs[$key]["label"].' ';
+ print ''.$langs->trans('Description').' '.$object->multilangs[$key]["description"].' ';
+ if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION))
+ {
+ print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").') '.$object->multilangs[$key]["other"].' ';
+ }
+ print '
';
+ }
+ }
+ if (! $cnt_trans && $action != 'add') print ''. $langs->trans('NoTranslation').'
';
+}
+
+
+
/*
* Form to add a new translation
*/
@@ -308,18 +313,18 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print ' ';
print '';
- print ''.$langs->trans('Language').' ';
+ print ' '.$langs->trans('Language').' ';
print $formadmin->select_language('','forcelangprod',0,$object->multilangs,1);
print ' ';
- print ''.$langs->trans('Label').' ';
- print ''.$langs->trans('Description').' ';
+ print ' '.$langs->trans('Label').' ';
+ print ''.$langs->trans('Description').' ';
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();
print ' ';
// Other field (not used)
if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION))
{
- print ''.$langs->trans('Other').' ('.$langs->trans("NotUsed").' ';
+ print ' '.$langs->trans('Other').' ('.$langs->trans("NotUsed").' ';
$doleditor = new DolEditor('other', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();
print ' ';
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index be6de2313a0..71f2dcd02c9 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -766,7 +766,7 @@ elseif ($object->id > 0)
print '';
// Description
- print ''.$langs->trans("Description").' ';
+ print ''.$langs->trans("Description").' ';
print '';
print ''.$object->description.' ';
print ' ';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 0e19e35b1f8..cd8728b3013 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -392,7 +392,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print '';
// Description
- print ''.$langs->trans("Description").' ';
+ print ''.$langs->trans("Description").' ';
print '';
print ''.$description.' ';
print ' ';
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index cc0eb0fed6f..25d66c724a2 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -398,7 +398,7 @@ if ($id > 0 || ! empty($ref))
print '';
// Description
- print ''.$langs->trans("Description").' ';
+ print ''.$langs->trans("Description").' ';
print '';
print ''.$object->description.' ';
print ' ';
@@ -509,7 +509,7 @@ if ($id > 0 || ! empty($ref))
print '';
// Description
- print ''.$langs->trans("Description").' ';
+ print ' '.$langs->trans("Description").' ';
print nl2br($object->description);
print ' ';
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 6d2b469fb55..b101e656f67 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -518,8 +518,8 @@ foreach($extrafields->attribute_label as $key=>$value)
}
// Comments
print '';
-print ''.$langs->trans("Comments").' ';
-print ''.dol_escape_htmltag(GETPOST('note_private')).' ';
+print ''.$langs->trans("Comments").' ';
+print ''.dol_escape_htmltag(GETPOST('note_private')).' ';
print ' '."\n";
// Add specific fields used by Dolibarr foundation for example
diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php
index cbac1692103..8f28cd12827 100644
--- a/htdocs/public/members/public_card.php
+++ b/htdocs/public/members/public_card.php
@@ -111,7 +111,7 @@ if ($id > 0)
// print "$value ".$object->array_options["options_$key"]." \n";
// }
- print ''.$langs->trans("Comments").' '.nl2br($object->note_public).' ';
+ print ''.$langs->trans("Comments").' '.nl2br($object->note_public).' ';
print '
';
}
diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
index f6b4bfeeb96..3d2dffafed7 100644
--- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_create.tpl.php
@@ -104,7 +104,7 @@
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
index f9481176098..1f6201ec829 100644
--- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php
@@ -119,7 +119,7 @@ if ($this->control->tpl['fournisseur']) {
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
index fa58b02413c..c6e80e87a91 100644
--- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
@@ -77,7 +77,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
index b30adb43825..67e8acf3534 100644
--- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php
@@ -114,7 +114,7 @@
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
index 5da15b95956..90543958902 100644
--- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
@@ -116,7 +116,7 @@ if ($this->control->tpl['fournisseur']) {
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
index 7249c752c1c..21f0cafcbb1 100644
--- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
@@ -76,7 +76,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
- trans('Address'); ?>
+ trans('Address'); ?>
control->tpl['address']; ?>
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index d91823dfcf4..e02a512f327 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1132,7 +1132,7 @@ if ($action == 'create')
$projectid = ($originid ? $originid : 0);
print '';
- print '' . $langs->trans("Project") . ' ';
+ print ' ' . $langs->trans("Project") . ' ';
$numprojet = $formproject->select_projects($soc->id, $projectid);
if ($numprojet == 0) {
@@ -1243,7 +1243,7 @@ if ($action == 'create')
}
print ' ';
- print ' ';
+ print ' ';
print '' . $langs->trans("CreateEmptyAsk") . ' ';
}
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 7dc774c501d..63cdacf958d 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -165,7 +165,7 @@ if ($id && $action != 'edit')
print '';
}
- print ''.$langs->trans("IBAN").' ';
+ print ''.$langs->trans("IBAN").' ';
print ''.$account->iban . ' ';
if (! empty($account->iban)) {
if (! checkIbanForAccount($account)) {
@@ -176,7 +176,7 @@ if ($id && $action != 'edit')
}
print ' ';
- print ''.$langs->trans("BIC").' ';
+ print ''.$langs->trans("BIC").' ';
print ''.$account->bic.' ';
if (! empty($account->bic)) {
if (! checkSwiftForAccount($account)) {
@@ -187,15 +187,15 @@ if ($id && $action != 'edit')
}
print ' ';
- print ''.$langs->trans("BankAccountDomiciliation").' ';
+ print ' '.$langs->trans("BankAccountDomiciliation").' ';
print $account->domiciliation;
print " \n";
- print ''.$langs->trans("BankAccountOwner").' ';
+ print ' '.$langs->trans("BankAccountOwner").' ';
print $account->proprio;
print " \n";
- print ''.$langs->trans("BankAccountOwnerAddress").' ';
+ print ' '.$langs->trans("BankAccountOwnerAddress").' ';
print $account->owner_address;
print " \n";
@@ -271,22 +271,22 @@ if ($id && $action == 'edit' && $user->rights->user->user->creer)
}
// IBAN
- print ''.$langs->trans("IBAN").' ';
+ print ''.$langs->trans("IBAN").' ';
print ' ';
- print ''.$langs->trans("BIC").' ';
+ print ''.$langs->trans("BIC").' ';
print ' ';
- print ''.$langs->trans("BankAccountDomiciliation").' ';
+ print ' '.$langs->trans("BankAccountDomiciliation").' ';
print '';
print $account->domiciliation;
print " ";
- print ''.$langs->trans("BankAccountOwner").' ';
+ print ''.$langs->trans("BankAccountOwner").' ';
print ' ';
print "\n";
- print ''.$langs->trans("BankAccountOwnerAddress").' ';
+ print ' '.$langs->trans("BankAccountOwnerAddress").' ';
print "";
print $account->owner_address;
print " ";
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 936673b1894..5d78cfde279 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -244,7 +244,7 @@ if ($action == 'create')
{
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
- print "".''.$langs->trans("Entity").' ';
+ print " ".''.$langs->trans("Entity").' ';
print "".$mc->select_entities($conf->entity);
print " \n";
}
@@ -330,7 +330,7 @@ else
if (! empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
$mc->getInfo($object->entity);
- print "".''.$langs->trans("Entity").' ';
+ print " ".''.$langs->trans("Entity").' ';
print ''.$mc->label;
print " \n";
}
@@ -406,7 +406,7 @@ else
{
if ($conf->entity == 1 && $conf->multicompany->transverse_mode)
{
- print ''.$langs->trans("Entity").' ';
+ print ''.$langs->trans("Entity").' ';
print "".$mc->select_entities($conf->entity);
}
else
@@ -518,7 +518,7 @@ else
{
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
- print " ".''.$langs->trans("Entity").' ';
+ print " ".''.$langs->trans("Entity").' ';
print "".$mc->select_entities($object->entity);
print " \n";
}
diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php
index 69143108e66..0a7eb94cca2 100644
--- a/htdocs/websites/index.php
+++ b/htdocs/websites/index.php
@@ -867,7 +867,7 @@ if ($action == 'editcss')
print $website;
print '';
- print '';
+ print ' ';
print $langs->trans('WEBSITE_CSS_INLINE');
print ' ';
print '';