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 @@ -     - +     + diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 7c5c6d08c73..2c22d8f191a 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -268,7 +268,7 @@ if ($action == 'create') print ''; // Label - print ''; + print ''; print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); print ''; print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index 23059889571..f0a50e2e9ba 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -108,7 +108,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?> - trans("Note"); ?> + trans("Note"); ?> diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 1d7f7892276..8f3af3fe8df 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -117,7 +117,7 @@ echo $this->control->tpl['ajax_selectcountry']; - trans("Note"); ?> + trans("Note"); ?> diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index acd1a0d701b..e426429ae05 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -102,7 +102,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] - trans("Note"); ?> + trans("Note"); ?> control->tpl['note']; ?> diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index ddcc6e50d5e..48461c64b02 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -873,7 +873,7 @@ else } // Address - print ''.$langs->trans("Address").''; + print ''.$langs->trans("Address").''; print ''; print ''; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index d15bdd30fd9..0c9c8467f1f 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1039,7 +1039,7 @@ if ($rowid > 0) //print ''.$langs->trans("Payment").''; // No more action - print ''.$langs->trans('MoreActions'); + print ''.$langs->trans('MoreActions'); print ''; print ''; print ' '.$langs->trans("None").'
'; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 5a76ccb59ce..ff7e243c1ab 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -251,10 +251,10 @@ if ($action == 'create') print $form->selectyesno("vote",0,1); print ''; - print ''.$langs->trans("Description").''; + print ''.$langs->trans("Description").''; print ''; - print ''.$langs->trans("WelcomeEMail").''; + print ''.$langs->trans("WelcomeEMail").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%'); $doleditor->Create(); @@ -314,10 +314,10 @@ if ($rowid > 0) print yn($object->vote); print ''; - print ''.$langs->trans("Description").''; + print ''.$langs->trans("Description").''; print nl2br($object->note).""; - print ''.$langs->trans("WelcomeEMail").''; + print ''.$langs->trans("WelcomeEMail").''; print nl2br($object->mail_valid).""; // Other attributes @@ -647,10 +647,10 @@ if ($rowid > 0) print $form->selectyesno("vote",$object->vote,1); print ''; - print ''.$langs->trans("Description").''; + print ''.$langs->trans("Description").''; print ''; - print ''.$langs->trans("WelcomeEMail").''; + print ''.$langs->trans("WelcomeEMail").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%'); $doleditor->Create(); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 3d7202d5c70..0f8efb23da0 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -786,7 +786,7 @@ else print ''; $var=!$var; - print ''.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . ''; + print ''.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . ''; print ''; @@ -952,7 +952,7 @@ else print ''; $var=!$var; - print ''.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . ''; + print ''.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . ''; print ''; print ''; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index cc8cc9b3597..ad33b4ce619 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -485,11 +485,11 @@ if ($mode != 'marketplace') print ''; // Name - print ''.$objMod->getName(); + print ''.$objMod->getName(); print "\n"; // Desc - print ''; + print ''; print nl2br($objMod->getDesc()); print "\n"; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index ee27833b5b4..8f1e0110ec1 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -145,7 +145,7 @@ print ''; ?> - - - + @@ -83,7 +83,7 @@ $object=$GLOBALS['object']; - + 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("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.''; ?>

- -
+'; print ''; - print ''; + print ''; print ''; - print ''; // Description - print ''."\n"; print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index c5f968dee4f..514c5d213d5 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -90,7 +90,7 @@ $statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSe volume_units; ?> -
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 '
'.$trigger['picto'].''.$trigger['file'].''.$trigger['file'].''.$trigger['status'].''; + 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 ''; - print ''; + print ''; print ''; @@ -172,7 +172,7 @@ if ($action == 'create') // Position print ''; print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'.$langs->trans("UrlOrLink").''.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'
'.$langs->trans("Position").''; - print 'position).'">'; + print 'position).'">'; 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 '
'; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; } - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '' , '', 0, '', '', 0); + + print '
'; print ''; - print ''; - - print ''; print ''; print ''; print ''; // Date creation - print ''; + print ''; print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'; + print '
'; if ($action == 'edit') { print ''; } @@ -231,8 +236,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) } print ''; - if ($action == 'edit') print 'title).'">'; - else print $bookmark->title; + if ($action == 'edit') print 'title).'">'; + else print $object->title; print '
'; @@ -244,34 +249,34 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; } print ''; - if ($action == 'edit') print 'url).'">'; - else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; + if ($action == 'edit') print 'url).'">'; + else print 'target?' target="_blank"':'').'>'.$object->url.''; print '
'.$langs->trans("BehaviourOnClick").''; if ($action == 'edit') { $liste=array(1=>$langs->trans("OpenANewWindow"),0=>$langs->trans("ReplaceWindow")); - print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target); + print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$object->target); } else { - if ($bookmark->target == 0) print $langs->trans("ReplaceWindow"); - if ($bookmark->target == 1) print $langs->trans("OpenANewWindow"); + if ($object->target == 0) print $langs->trans("ReplaceWindow"); + if ($object->target == 1) print $langs->trans("OpenANewWindow"); } print '
'.$langs->trans("Owner").''; if ($action == 'edit' && $user->admin) { - print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($object->fk_user?$object->fk_user:''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); } else { - if ($bookmark->fk_user) + if ($object->fk_user) { $fuser=new User($db); - $fuser->fetch($bookmark->fk_user); + $fuser->fetch($object->fk_user); print $fuser->getNomUrl(1); } else @@ -283,12 +288,12 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) // Position print '
'.$langs->trans("Position").''; - if ($action == 'edit') print 'position).'">'; - else print $bookmark->position; + if ($action == 'edit') print 'position).'">'; + else print $object->position; print '
'.$langs->trans("DateCreation").''.dol_print_date($bookmark->datec,'dayhour').'
'.$langs->trans("DateCreation").''.dol_print_date($object->datec,'dayhour').'
'; @@ -308,13 +313,13 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) // Edit if ($user->rights->bookmark->creer && $action != 'edit') { - print " id."&action=edit\">".$langs->trans("Edit")."\n"; + print " id."&action=edit\">".$langs->trans("Edit")."\n"; } // Remove if ($user->rights->bookmark->supprimer && $action != 'edit') { - print " id."&action=delete\">".$langs->trans("Delete")."\n"; + print " id."&action=delete\">".$langs->trans("Delete")."\n"; } print ''; diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 06490f21cda..0e0d6df5f35 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -26,8 +26,13 @@ /** * Class to manage bookmarks */ -class Bookmark +class Bookmark extends CommonObject { + public $element='bookmark'; + public $table_element='bookmark'; + protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + public $picto = 'bookmark'; + var $db; var $id; @@ -228,4 +233,15 @@ class Bookmark return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } + /** + * 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 ''; + } + } diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 87b869fd738..ed497cbbb7f 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -250,7 +250,7 @@ if ($user->rights->categorie->creer) 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 ''; - // Description - print ''; @@ -144,7 +147,7 @@ if ($object->id) print "
'; - $ways = $object->print_all_ways(" >> ", '', 1); - print $langs->trans("Ref").''; - print ''.$langs->trans("Root").' >> '; - foreach ($ways as $way) - { - print $way."
\n"; - } - print '
'; + print '
'; print $langs->trans("Description").''; print dol_htmlentitiesbr($object->description); 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 ''; -print ''; - // Description -print ''; @@ -187,6 +202,32 @@ 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 '
'; print $langs->trans("Description").''; print dol_htmlentitiesbr($object->description); print '
'; +dol_fiche_end(); + + + + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + +print "\n
\n"; + +if ($action == '') +{ + if ($user->rights->produit->creer || $user->rights->service->creer) + { + print ''.$langs->trans("Add").''; + if ($cnt_trans > 0) print ''.$langs->trans("Update").''; + } +} + +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 ''; + print ''; print '
'.$langs->trans('Label').'
'.$langs->trans('Label').'
'.$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 ''; - print ''; + print ''; + print ''; + print ''; + if (! empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) + { + print ''; + } print '
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'.$langs->trans('Note').''.$object->multilangs[$key]["note"].'
'.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
'; } } - if (! $cnt_trans) print '
'. $langs->trans('NoTranslation'); + if (! $cnt_trans && $action != 'add') print '
'. $langs->trans('NoTranslation').'
'; } -print "
\n"; - - -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - -print "\n
\n"; - -if ($action == '') -if ($user->rights->produit->creer || $user->rights->service->creer) -{ - print ''.$langs->trans("Add").''; - print ''.$langs->trans("Update").''; -} - -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 ''; print ''; - 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 '
'.$langs->trans('Translation').''; + print '
'.$langs->trans('Translation').''; print $formadmin->select_language('','forcelangprod',0,$object->multilangs); print '
'.$langs->trans('Label').'
'.$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 '
'; -// Path of category -print ''; - // Description -print ''; @@ -359,7 +366,7 @@ if ($object->type == Categorie::TYPE_PRODUCT) print '\n"; - print '\n"; + print '\n"; // Link to delete from category print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; // Link to delete from category print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; // Link to delete from category print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; // Link to delete from category print ''; print ''; - print ''; @@ -353,7 +353,7 @@ elseif ($action == 'edit') print ''; print ''; - print ''; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 7510c0a5b96..80c6305fcec 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -91,7 +91,7 @@ if ($_socid > 0) dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company'); print '
'; -$ways = $object->print_all_ways(" >> ", '', 1); -print $langs->trans("Ref").''; -print ''.$langs->trans("Root").' >> '; -foreach ($ways as $way) -{ - print $way."
\n"; -} -print '
'; +print '
'; print $langs->trans("Description").''; print dol_htmlentitiesbr($object->description); print '
'; print $prod->getNomUrl(1); print "'.$prod->label."'.$prod->label."'; $typeid=$object->type; @@ -520,8 +527,8 @@ if ($object->type == Categorie::TYPE_MEMBER) $member->ref=$member->login; print $member->getNomUrl(1,0); print "'.$member->lastname."'.$member->firstname."'.$member->lastname."'.$member->firstname."'; $typeid=$object->type; @@ -628,8 +635,8 @@ if ($object->type == Categorie::TYPE_ACCOUNT) print ''; print $account->getNomUrl(1,0); print "'.$account->bank."'.$account->number."'.$account->bank."'.$account->number."'; $typeid=$object->type; @@ -683,8 +690,8 @@ if ($object->type == Categorie::TYPE_PROJECT) print ''; print $project->getNomUrl(1,0); print "'.$project->ref."'.$project->title."'.$project->ref."'.$project->title."'; $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').'
'.$langs->trans('Name').'
'.$langs->trans('Address').'
'.$langs->trans('AddressLabel').'
'.$langs->trans('Name').'
'.$langs->trans('Address').'
'; - print ' - + diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index c275902d384..56e91894cdd 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -129,7 +129,7 @@ echo $this->control->tpl['ajax_selectcountry']; - + diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index 0b4b8a07fcb..5dc1c12808f 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -114,7 +114,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] - + diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index f263763f7ab..a27dbfbc71a 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1161,14 +1161,14 @@ if ($action == 'create') print ""; } - print ''; if (empty($user->societe_id)) { - print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ab0999cfdb8..22a397fb4e7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3445,7 +3445,7 @@ class Form foreach($input['values'] as $selkey => $selval) { $more.=''; - if ($i==0) $more.=''; + if ($i==0) $more.=''; else $more.=''; $more.='\n"; + if (! $silent) print '\n"; dol_syslog('Admin.lib::run_sql Request '.($i+1), LOG_DEBUG); $sqlmodified=0; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index eb69364596f..acd74643a38 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1090,7 +1090,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if (! empty($object->name_alias)) $morehtmlref.='
'.$object->name_alias.'
'; // For thirdparty if ($object->element == 'product' && ! empty($object->label)) $morehtmlref.='
'.$object->label.'
'; - if ($object->element != 'product') + if ($object->element != 'product' && $object->element != 'bookmark') { $morehtmlref.='
'; $morehtmlref.=$object->getBannerAddress('refaddress',$object); diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 59403147977..bd066d73a05 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -57,87 +57,87 @@ Cochez la case concernée (1) :
'; + print '
'; print ''; print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 74861d3ee67..d7c5682e0a9 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -421,7 +421,7 @@ if ($action == 'create' && !$error) print ''."\n"; // Type - print ''; - print ''; + print ''; print ''; print "'; @@ -234,8 +234,8 @@ if ($action == 'create') print ''."\n"; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print '
'; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 01ac00cd6d2..9b416fd1457 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1601,7 +1601,7 @@ if ($action == 'create') } print '
' . $langs->trans("CreateEmptyPropal") . '
'.$langs->trans('Type').''; + print '
'.$langs->trans('Type').''; print ''."\n"; // Standard invoice diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 46eb7512d40..6bc4f628ba9 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -373,7 +373,7 @@ else if ($id) print ''; // Public note - print ''; + print ''; print ''; + print ''; print ''; // Km/Price - print ''; - print ''; print '
'.$langs->trans("NotePublic").'
'.$langs->trans("NotePublic").''; $doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); @@ -384,7 +384,7 @@ else if ($id) // Private note if (empty($user->societe_id)) { - print '
'.$langs->trans("NotePrivate").'
'.$langs->trans("NotePrivate").''; $doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); @@ -456,7 +456,7 @@ else if ($id) print '
'; + print '
'; print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 16fdc406db9..59298616f05 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2208,7 +2208,7 @@ if ($action == 'create') $optionsav .= ''; } - print '
' . $langs->trans('Type') . ''; + print '
' . $langs->trans('Type') . ''; print '
' . "\n"; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index aec64683e3a..4c2ed3b1aaa 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -512,7 +512,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Comments print '
'.$langs->trans('Comments').''; + print ''; print '
'; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 3822f9f91f5..342294dfc12 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -203,7 +203,7 @@ if ($action == 'create') $db->free(); } print '
'.$langs->trans("AlreadyPaid").''.price($sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'
".$langs->trans("Payment").'
'.$langs->trans("Comments").''.$langs->trans("Comments").'
'; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 3fce45b848f..fbd1d1909a8 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -114,7 +114,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
trans("Note"); ?>trans("Note"); ?>
trans("Note"); ?>trans("Note"); ?>
trans("Note"); ?>trans("Note"); ?> control->tpl['note']; ?>
'.$langs->trans("NotePublic").''; + print '
'.$langs->trans("NotePublic").''; $doleditor=new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
'.$langs->trans("NotePrivate").''; + print '
'.$langs->trans("NotePrivate").''; $doleditor=new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
'.$input['label'].''.$input['label'].' entity),$sql); // Ajout trace sur requete (eventuellement a commenter si beaucoup de requetes) - if (! $silent) print '
'.$langs->trans("Request").' '.($i+1)." sql='".dol_htmlentities($newsql,ENT_NOQUOTES)."'
'.$langs->trans("Request").' '.($i+1)." sql='".dol_htmlentities($newsql,ENT_NOQUOTES)."'
- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
Association ou fondation reconnue d'utilité publique par décret en date du ........./ ..... /........... publié au Journal officiel du ......./ ....../ .......... . ou association située dans le département de la Moselle, du Bas-Rhin ou du Haut-Rhin dont la mission a été reconnue d'utilité publique par arrêté préfectoral en date du …./.…/……..
Fondation universitaire ou fondation partenariale mentionnées respectivement aux articles L. 719-12 et L. 719-13 du code de l'éducation
Fondation d'entreprise
Oeuvre ou organisme d'intérêt général
Musée de France
Établissement d'enseignement supérieur ou d’enseignement artistique public ou privé, d’intérêt général, à but non lucratif
Organisme ayant pour objet exclusif de participer financièrement à la création d'entreprises
Association cultuelle ou de bienfaisance et établissement public des cultes reconnus d'Alsace-Moselle
Organisme ayant pour activité principale l'organisation de festivals
Association fournissant gratuitement une aide alimentaire ou des soins médicaux à des personnes en difficulté ou favorisant leur logement
Fondation du patrimoine ou fondation ou association qui affecte irrévocablement les dons à la Fondation du patrimoine, en vue de subventionner les travaux prévus par les conventions conclues entre la Fondation du patrimoine et les propriétaires des immeubles (article L. 143-2-1 du code du patrimoine)
Établissement de recherche public ou privé, d’intérêt général, à but non lucratif
Entreprise d’insertion ou entreprise de travail temporaire d’insertion (articles L. 5132-5 et L. 5132-6 du code du travail).
Associations intermédiaires (article L. 5132-7 du code du travail)
Ateliers et chantiers d’insertion (article L. 5132-15 du code du travail)
Entreprises adaptées (article L. 5213-13 du code du travail)
Agence nationale de la recherche (ANR)
Société ou organisme agréé de recherche scientifique ou technique (2)
Autre organisme : ………………………………………………………………………………………………
@@ -250,7 +250,7 @@ - + - + diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index d5863281ff8..b641627b789 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -102,7 +102,7 @@ if (! empty($hookmanager->resArray['options'])) { ?> - '; + print '"; @@ -148,7 +148,7 @@ if (! empty($force_install_message)) - - - - + - - - - - + '; - print ''; print ''; - print ''; diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index fff2cf7a03d..408fe3c646f 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -186,7 +186,7 @@ if ($action == 'create') $db->free(); } print ''; - print ''; + print ''; print ''; print '
(3)(3) L’organisme bénéficiaire peut cocher une ou plusieurs cases.
L’organisme bénéficiaire peut, en application de l’article L. 80 C du livre des procédures fiscales, demander à l’administration s’il relève @@ -261,7 +261,7 @@
(4)(4) Notamment : abandon de revenus ou de produits ; frais engagés par les bénévoles, dont ils renoncent expressément au remboursement
+ '; - print ''; + print ''; print ''; print "'; @@ -227,7 +227,7 @@ if (GETPOST("action") == 'create') print ''."\n"; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index 1b36d0433d1..cf135e5ecb1 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -166,7 +166,7 @@ if ($action == 'create') print ''."\n"; // Description - print ''; -/*print ''; print ''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 1032b8b20ba..1048e41c18c 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -379,7 +379,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } print ''; print ''; - print ''; print ''; dol_fiche_end(); diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 32dff5f10ef..2b8f57d9d3c 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -117,7 +117,7 @@ if (! empty($force_install_message))
'; print $langs->trans("WebPagesDirectory"); print "
trans("DocumentsDirectory"); ?> + trans("DocumentsDirectory"); ?>
trans("URLRoot"); ?> + trans("URLRoot"); ?> +
trans("ForceHttps"); ?>trans("ForceHttps"); ?>
trans("DriverType"); ?> + trans("DriverType"); ?> @@ -337,9 +337,9 @@ if (! empty($force_install_message))
trans("DatabaseServer"); ?> + trans("DatabaseServer"); ?> +
trans("Port"); ?> + trans("Port"); ?> '; print ''.$langs->trans('NotePrivate').''; + print ''; $doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, true, ROWS_6, '90%'); print $doleditor->Create(1); @@ -263,7 +263,7 @@ if ($action == 'create') // Note Public print '
'.$langs->trans('NotePublic').''; + print ''; $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, true, ROWS_6, '90%'); print $doleditor->Create(1); print '
'.$langs->trans("AlreadyPaid").''.price($sumpaid, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans("RemainderToPay").''.price($total-$sumpaid, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'; @@ -223,12 +223,12 @@ if ($action == 'create') print '
'.$langs->trans("NotePrivate").''.$langs->trans("NotePrivate").'
'.$langs->trans("NotePublic").''.$langs->trans("NotePublic").'
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; ?>
trans("Note"); ?>trans("Note"); ?> note; ?>
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).": ".''.img_delete('', '')."
"; - - print ''; - print ''; - print ''; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) - { - print ''; - print '
'.$langs->trans('Label').'
'.$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 '
'.$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 '
'; - } - } - - 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 ''; - print ''; - print ''; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) - { - print ''; - } - print '
'.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
'; - } - } - 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 == '') -if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''.$langs->trans("Add").''; - print ''.$langs->trans("Update").''; + if ($user->rights->produit->creer || $user->rights->service->creer) + { + print ''.$langs->trans("Add").''; + if ($cnt_trans > 0) print ''.$langs->trans("Update").''; + } } 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).": ".''.img_delete('', '')."
"; + + print ''; + print ''; + print ''; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) + { + print ''; + print '
'.$langs->trans('Label').'
'.$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 '
'.$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 '
'; + +} +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 ''; + print ''; + print ''; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) + { + print ''; + } + print '
'.($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
'; + } + } + 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 ''; - print ''; - print ''; + print ''; // Other field (not used) if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { - 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 ''; + print ''; 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 ''; + print ''; 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 ''; + print ''; print ''; @@ -509,7 +509,7 @@ if ($id > 0 || ! empty($ref)) print ''; // 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 ''; -print ''; +print ''; +print ''; 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 "\n"; // } - print ''; + print ''; print '
'.$langs->trans('Language').''; + print '
'.$langs->trans('Language').''; print $formadmin->select_language('','forcelangprod',0,$object->multilangs,1); print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; + print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); 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 '
'.$langs->trans("Description").'
'.$langs->trans("Description").''; print ''; print '
'.$langs->trans("Description").'
'.$langs->trans("Description").''; print ''; print '
'.$langs->trans("Description").'
'.$langs->trans("Description").''; print ''; print '
'.$langs->trans("Description").''; + print ''.$langs->trans("Description").''; print nl2br($object->description); print '
'.$langs->trans("Comments").''.$langs->trans("Comments").'
$value".$object->array_options["options_$key"]." 
'.$langs->trans("Comments").''.nl2br($object->note_public).'
'.$langs->trans("Comments").''.nl2br($object->note_public).'
'; } 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'); ?> 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'); ?> 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'); ?> 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'); ?> 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 ''.$langs->trans("BankAccountOwner").''; + print ''.$langs->trans("BankAccountOwner").''; print ''; print "\n"; - print ''.$langs->trans("BankAccountOwnerAddress").''; + print ''.$langs->trans("BankAccountOwnerAddress").''; 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 '