diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 8ea6a566a92..ad06afb1d9d 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -1,6 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville + * Copyright (C) 2010 Destailleur Laurent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,7 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/html.formadmin.class.php"); @@ -80,12 +82,11 @@ $_POST["cancel"] != $langs->trans("Cancel") && if ( $product->setMultiLangs() > 0 ) { $_GET["action"] = ''; - $mesg = 'Fiche mise a jour'; } else { $_GET["action"] = 'add'; - $mesg = 'Fiche non mise a jour !' . "
" . $product->mesg_error; + $mesg = $product->mesg_error; } } @@ -165,9 +166,9 @@ if ($_GET["action"] == 'edit') foreach ( $product->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').''; if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) { @@ -196,10 +197,10 @@ if ($_GET["action"] == 'edit') print '
'; } - print '
'; - print ''; - print '
 '; - print '
'; + print '
'; + print '     '; + print '
'; + print ''; } @@ -209,18 +210,20 @@ else foreach ( $product->multilangs as $key => $value) { $cnt_trans++; - print "
".$langs->trans('Language_'.$key)." :
"; + $s=picto_from_langcode($key); + print "
".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).":
"; print ''; print ''; print ''; print ''; print '
'.$langs->trans('Label').''.$product->multilangs[$key]["libelle"].'
'.$langs->trans('Description').''.$product->multilangs[$key]["description"].'
'.$langs->trans('Note').''.$product->multilangs[$key]["note"].'
'; } - if ( !$cnt_trans ) print '
'. $langs->trans('NoTranslation'); + if ( !$cnt_trans ) print '
'. $langs->trans('NoTranslation'); } print "\n"; + /* ************************************************************************** */ /* */ /* Barre d'action */ @@ -232,16 +235,17 @@ print "\n
\n"; if ($_GET["action"] == '') if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''.$langs->trans("Update").''; print ''.$langs->trans("Add").''; + print ''.$langs->trans("Update").''; } print "\n
\n"; /* - * Formulaire d'ajout de traduction + * Form to add a new translation */ + if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights->service->creer)) { print '
'; @@ -249,19 +253,43 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights- print ''; print ''; print ''; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print '
'.$langs->trans('Translation').''; + print '
'.$langs->trans('Translation').''; $formadmin->select_lang('','lang',0,$product->multilangs); print '
'.$langs->trans('Label').'
'.$langs->trans('Description').'
'.$langs->trans('Note').'
'.$langs->trans('Label').'
'.$langs->trans('Description').''; + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('desc','',160,'dolibarr_notes','',false); + $doleditor->Create(); + } + else + { + print ''; + } + print '
'.$langs->trans('Note').''; + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('note','',160,'dolibarr_notes','',false); + $doleditor->Create(); + } + else + { + print ''; + } + print '
'; - print '
'; - print ''; - print '
 '; - print '
'; + + print '
'; + print '     '; + print '
'; + print '';