diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index abbc1e038c5..8c7e6937a47 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * * 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 @@ -37,14 +37,15 @@ $langs->load("companies"); $langs->load("products"); $langs->load("members"); -if (!$user->admin) - accessforbidden(); +if (! $user->admin) accessforbidden(); + +$action = GETPOST('action','alpha'); /* * Actions */ -if (isset($_POST["action"]) && $_POST["action"] == 'update') +if ($action == 'update') { dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity); @@ -75,8 +76,9 @@ print_fiche_titre($langs->trans("PDF"),'','setup'); print $langs->trans("PDFDesc")."
\n"; print "
\n"; +$noCountryCode = (empty($mysoc->country_code) ? true : false); -if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit +if ($action == 'edit') // Edit { print '
'; print ''; @@ -113,35 +115,75 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit // Show prof id 1 in address into pdf $var=!$var; - $pid1=$langs->transcountry("ProfId1",$mysoc->pays_code); - if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; - print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1); - print ''; + if (! $noCountryCode) + { + $pid1=$langs->transcountry("ProfId1",$mysoc->country_code); + if ($pid1 == '-') $pid1=false; + } + else + { + $pid1 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid1) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; + print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode); + print ''; + } // Show prof id 2 in address into pdf $var=!$var; - $pid2=$langs->transcountry("ProfId2",$mysoc->pays_code); - if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; - print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1); - print ''; + if (! $noCountryCode) + { + $pid2=$langs->transcountry("ProfId2",$mysoc->country_code); + if ($pid2 == '-') $pid2=false; + } + else + { + $pid2 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid2) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; + print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode); + print ''; + } // Show prof id 3 in address into pdf $var=!$var; - $pid3=$langs->transcountry("ProfId3",$mysoc->pays_code); - if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; - print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1); - print ''; + if (! $noCountryCode) + { + $pid3=$langs->transcountry("ProfId3",$mysoc->country_code); + if ($pid3 == '-') $pid3=false; + } + else + { + $pid3 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid3) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; + print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode); + print ''; + } // Show prof id 4 in address into pdf $var=!$var; - $pid4=$langs->transcountry("ProfId4",$mysoc->pays_code); - if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; - print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1); - print ''; + if (! $noCountryCode) + { + $pid4=$langs->transcountry("ProfId4",$mysoc->country_code); + if ($pid4 == '-') $pid4=false; + } + else + { + $pid4 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid4) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; + print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode); + print ''; + } print ''; @@ -207,35 +249,75 @@ else // Show // Show prof id 1 in address into pdf $var=!$var; - $pid1=$langs->transcountry("ProfId1",$mysoc->pays_code); - if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; - print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1); - print ''; + if (! $noCountryCode) + { + $pid1=$langs->transcountry("ProfId1",$mysoc->country_code); + if ($pid1 == '-') $pid1=false; + } + else + { + $pid1 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid1) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid1.''; + print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1); + print ''; + } // Show prof id 2 in address into pdf $var=!$var; - $pid2=$langs->transcountry("ProfId2",$mysoc->pays_code); - if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; - print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1); - print ''; + if (! $noCountryCode) + { + $pid2=$langs->transcountry("ProfId2",$mysoc->country_code); + if ($pid2 == '-') $pid2=false; + } + else + { + $pid2 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid2) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid2.''; + print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1); + print ''; + } // Show prof id 3 in address into pdf $var=!$var; - $pid3=$langs->transcountry("ProfId3",$mysoc->pays_code); - if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; - print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1); - print ''; + if (! $noCountryCode) + { + $pid3=$langs->transcountry("ProfId3",$mysoc->country_code); + if ($pid3 == '-') $pid3=false; + } + else + { + $pid3 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid3) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid3.''; + print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1); + print ''; + } // Show prof id 4 in address into pdf $var=!$var; - $pid4=$langs->transcountry("ProfId4",$mysoc->pays_code); - if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4"); - print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; - print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1); - print ''; + if (! $noCountryCode) + { + $pid4=$langs->transcountry("ProfId4",$mysoc->country_code); + if ($pid4 == '-') $pid4=false; + } + else + { + $pid4 = img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; + } + if ($pid4) + { + print ''.$langs->trans("ShowProfIdInAddress").' - '.$pid4.''; + print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1); + print ''; + } print ''."\n"; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 1742fd1ff64..8d87ce0a0b1 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -83,6 +83,9 @@ if ($_GET["msg"]) print "\n"; } + +$label=getStaticMember($db, 'label'); + ?> @@ -99,7 +102,7 @@ if ($_GET["msg"])
trans("ExportMethod"); ?>
@@ -112,7 +115,7 @@ if ($_GET["msg"])
@@ -122,7 +125,7 @@ if ($_GET["msg"]) } else { - print 'No method available with database '.$db::$label; + print 'No method available with database '.$label; } ?>
@@ -134,7 +137,7 @@ if ($_GET["msg"])
trans("MySqlExportParameters"); ?> @@ -217,7 +220,7 @@ if ($_GET["msg"])
trans("PostgreSqlExportParameters"); ?> @@ -281,8 +284,8 @@ if ($_GET["msg"]) id="filename_template" value="" />
@@ -296,7 +299,7 @@ $compression=array( // 'zip' => array('function' => 'zip_open', 'id' => 'radio_compression_zip', 'label' => $langs->trans("Zip")), Not open source 'gz' => array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")), ); -if ($db::$label == 'MySQL') +if ($label == 'MySQL') { $compression['bz']=array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2")); } @@ -339,10 +342,10 @@ print "\n"; show_documents('systemtools','backup',$conf->admin->dir_output.'/backup',$_SERVER['PHP_SELF'],0,1,'',1,0,0,54,0,'',$langs->trans("PreviousDumpFiles")); //if ($result) print '

'; llxFooter(); $db->close(); +?> \ No newline at end of file diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 28c39d2c8b2..9ab484aa75f 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -58,6 +58,8 @@ print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'

'; print $langs->trans("RestoreDesc2",DOL_DATA_ROOT).'

'; print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

'; +$label=getStaticMember($db, 'label'); + ?>
@@ -69,7 +71,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

';
trans("ImportMethod"); ?>
@@ -78,7 +80,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

';
@@ -89,7 +91,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

'; } else { - print 'No method available with database '.$db::$label; + print 'No method available with database '.$label; } ?>
@@ -101,7 +103,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'

';
@@ -135,7 +137,7 @@ if ($db::$label == 'MySQL')
@@ -180,8 +182,7 @@ else if ($db::$label == 'PostgreSQL')
close(); - -llxFooter(); ?> \ No newline at end of file diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 7667793ced8..d262b66b359 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -394,7 +394,7 @@ function backup_tables($outputfile, $tables='*') // Print headers and global mysql config vars $sqlhead = ''; - $sqlhead .= "-- ".$db::$label." dump via php + $sqlhead .= "-- ".getStaticMember($db, 'label')." dump via php -- -- Host: ".$db->db->host_info." Database: ".$db->database_name." -- ------------------------------------------------------ diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ba5e55398bc..70c61bc5891 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3528,14 +3528,15 @@ class Form /** - * Return an html string with a select combo box to choose yes or no + * Return an html string with a select combo box to choose yes or no * - * @param name Name of html select field - * @param value Pre-selected value - * @param option 0 return yes/no, 1 return 1/0 - * @return int or string See option + * @param string $name Name of html select field + * @param string $value Pre-selected value + * @param int $option 0 return yes/no, 1 return 1/0 + * @param bool $disabled true or false + * @return mixed See option */ - function selectyesno($htmlname,$value='',$option=0) + function selectyesno($htmlname,$value='',$option=0,$disabled=false) { global $langs; @@ -3546,8 +3547,10 @@ class Form $yes="1"; $no="0"; } + + $disabled = ($disabled ? ' disabled="disabled"' : ''); - $resultyesno = ''."\n"; if (("$value" == 'yes') || ($value == 1)) { $resultyesno .= ''."\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5f1c193719e..9bae445901f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -145,6 +145,33 @@ if (! function_exists('json_decode')) } } +/** + * Function to return value of a static property when class + * name is dynamically defined (not hard coded). + * This is because $myclass::$myvar works from PHP 5.3.0+ only + * + * @param string $class Class name + * @param string $member Name of property + * @return string Return value of static property. + */ +function getStaticMember($class, $member) +{ + if (is_object($class)) $class = get_class($class); + $classObj = new ReflectionClass($class); + $result = null; + + foreach($classObj->getStaticProperties() as $prop => $value) + { + if($prop == $member) + { + $result = $value; + break; + } + } + + return $result; +} + /** * Return a DoliDB instance (database handler). @@ -3522,10 +3549,10 @@ function picto_required() /** * Clean a string from all HTML tags and entities * - * @param StringHtml String to clean - * @param removelinefeed Replace also all lines feeds by a space - * @param pagecodeto Encoding of input string - * @return string String cleaned + * @param string $StringHtml String to clean + * @param string $removelinefeed Replace also all lines feeds by a space + * @param string $pagecodeto Encoding of input string + * @return string String cleaned */ function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8') { @@ -3549,10 +3576,10 @@ function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8') /** * Replace CRLF in string with a HTML BR tag * - * @param stringtoencode String to encode - * @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br - * @param forxml false=Use
, true=Use
- * @return string String encoded + * @param string $stringtoencode String to encode + * @param string $nl2brmode 0=Adding br before \n, 1=Replacing \n by br + * @param string $forxml false=Use
, true=Use
+ * @return string String encoded */ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) { @@ -3583,6 +3610,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * @param string $stringtoencode String to encode * @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example) * @param string $pagecodefrom Pagecode stringtoencode is encoded + * @return string String encoded */ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') { @@ -3608,8 +3636,9 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') /** * This function is called to decode a HTML string (it decodes entities and br tags) * - * @param stringtodecode String to decode - * @param pagecodeto Page code for result + * @param string $stringtodecode String to decode + * @param string $pagecodeto Page code for result + * @return string String decoded */ function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8') { @@ -3624,7 +3653,8 @@ function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8') /** * This function remove all ending \n and br at end * - * @param stringtodecode String to decode + * @param string $stringtodecode String to decode + * @return string String decoded */ function dol_htmlcleanlastbr($stringtodecode) { @@ -3635,9 +3665,9 @@ function dol_htmlcleanlastbr($stringtodecode) /** * This function is called to decode a string with HTML entities (it decodes entities tags) * - * @param stringhtml stringhtml - * @param pagecodeto Encoding of input string - * @return string decodestring + * @param string $stringhtml stringhtml + * @param string $pagecodeto Encoding of input string + * @return string decodestring */ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8') { @@ -3648,10 +3678,10 @@ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8') /** * Replace html_entity_decode functions to manage errors * - * @param a - * @param b - * @param c - * @return string String decoded + * @param string $a Operand a + * @param string $b Operand b + * @param string $c Operand c + * @return string String decoded */ function dol_html_entity_decode($a,$b,$c) { @@ -3663,10 +3693,10 @@ function dol_html_entity_decode($a,$b,$c) /** * Replace htmlentities functions to manage errors * - * @param a - * @param b - * @param c - * @return string String encoded + * @param string $a Operand a + * @param string $b Operand b + * @param string $c Operand c + * @return string String encoded */ function dol_htmlentities($a,$b,$c) { @@ -3681,8 +3711,8 @@ function dol_htmlentities($a,$b,$c) * If not, it will we considered not HTML encoded even if it is by FPDF. * Example, if string contains euro symbol that has ascii code 128 * - * @param s String to check - * @return int 0 if bad iso, 1 if good iso + * @param string $s String to check + * @return int 0 if bad iso, 1 if good iso */ function dol_string_is_good_iso($s) { @@ -3915,8 +3945,8 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='') * @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify) * @return string Return html output * - * @see dol_print_error - * @see dol_htmloutput_errors + * @see dol_print_error + * @see dol_htmloutput_errors */ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0) { @@ -3997,8 +4027,8 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb * @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify) * @return string Return html output * - * @see dol_print_error - * @see dol_htmloutput_mesg + * @see dol_print_error + * @see dol_htmloutput_mesg */ function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0) { @@ -4014,8 +4044,8 @@ function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0) * @param int $keepembedded Set to 1 if message must be kept embedded into its html place (this disable jnotify) * @return void * - * @see dol_print_error - * @see dol_htmloutput_errors + * @see dol_print_error + * @see dol_htmloutput_errors */ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0) { @@ -4064,8 +4094,8 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb * @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify) * @return void * - * @see dol_print_error - * @see dol_htmloutput_mesg + * @see dol_print_error + * @see dol_htmloutput_mesg */ function dol_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0) { @@ -4229,8 +4259,8 @@ function verifCond($strRights) * Replace eval function to add more security. * This function is called by verifCond() * - * @param string $s - * @return void + * @param string $s String to evaluate + * @return mixed Result of eval */ function dol_eval($s) { diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index a6282d7e4c6..46a0162d6f1 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -192,7 +192,7 @@ if (! defined('ODTPHP_PATHTOPCLZIP')) { define('ODTPHP_PATHTOPCLZIP', (!isset( if (! defined('ARTICHOW_PATH')) { define('ARTICHOW_PATH', (!isset($dolibarr_lib_ARTICHOW))?DOL_DOCUMENT_ROOT.'/includes/artichow/':(empty($dolibarr_lib_ARTICHOW)?'':$dolibarr_lib_ARTICHOW.'/')); } // Other required path if (! defined('ARTICHOW_FONT')) { define('ARTICHOW_FONT', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?DOL_DOCUMENT_ROOT.'/includes/fonts':dirname($dolibarr_font_DOL_DEFAULT_TTF_BOLD)); } -if (! defined('ARTICHOW_FONT_NAMES')) { define('ARTICHOW_FONT_NAMES', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?'Tuffy,TuffyBold,TuffyBoldItalic,TuffyItalic':'DejaVuSans,DejaVuSans-Bold,DejaVuSans-BoldOblique,DejaVuSans-Oblique'); } +if (! defined('ARTICHOW_FONT_NAMES')) { define('ARTICHOW_FONT_NAMES', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?'Aerial,AerialBd,AerialBdIt,AerialIt':'DejaVuSans,DejaVuSans-Bold,DejaVuSans-BoldOblique,DejaVuSans-Oblique'); } if (! defined('DOL_DEFAULT_TTF')) { define('DOL_DEFAULT_TTF', (!isset($dolibarr_font_DOL_DEFAULT_TTF))?DOL_DOCUMENT_ROOT.'/includes/fonts/Aerial.ttf':(empty($dolibarr_font_DOL_DEFAULT_TTF)?'':$dolibarr_font_DOL_DEFAULT_TTF)); } if (! defined('DOL_DEFAULT_TTF_BOLD')) { define('DOL_DEFAULT_TTF_BOLD', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?DOL_DOCUMENT_ROOT.'/includes/fonts/AerialBd.ttf':(empty($dolibarr_font_DOL_DEFAULT_TTF_BOLD)?'':$dolibarr_font_DOL_DEFAULT_TTF_BOLD)); } // Old path to root deprecated (no more used). diff --git a/htdocs/includes/artichow/Artichow.cfg.php b/htdocs/includes/artichow/Artichow.cfg.php index 7894a943303..ea4b91c9b2f 100644 --- a/htdocs/includes/artichow/Artichow.cfg.php +++ b/htdocs/includes/artichow/Artichow.cfg.php @@ -73,10 +73,10 @@ define('ARTICHOW_DEPRECATED', TRUE); // DOL_CHANGE LDR if (defined('ARTICHOW_FONT_NAMES')) $fonts=explode(',',constant('ARTICHOW_FONT_NAMES')); else $fonts = array( - 'Tuffy', - 'TuffyBold', - 'TuffyBoldItalic', - 'TuffyItalic' + 'Aerial', + 'AerialBd', + 'AerialBdIt', + 'AerialIt' ); global $artichow_defaultfont; $artichow_defaultfont=$fonts[0]; diff --git a/htdocs/includes/artichow/php5/AntiSpam.class.php b/htdocs/includes/artichow/php5/AntiSpam.class.php index 0d06b2c2b3b..b0dd33de64c 100644 --- a/htdocs/includes/artichow/php5/AntiSpam.class.php +++ b/htdocs/includes/artichow/php5/AntiSpam.class.php @@ -122,11 +122,12 @@ class awAntiSpam extends awImage { */ public function draw() { + // We redefine $fonts here because we need a full path to font $fonts = array( - ARTICHOW_FONT.DIRECTORY_SEPARATOR.'Tuffy.ttf', - ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyBold.ttf', - ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyItalic.ttf', - ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyBoldItalic.ttf' + ARTICHOW_FONT.DIRECTORY_SEPARATOR.'Aerial.ttf', + ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialBd.ttf', + ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialBdIt.ttf', + ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialIt.ttf' ); $sizes = array(12, 12.5, 13, 13.5, 14, 15, 16, 17, 18, 19); diff --git a/htdocs/includes/fonts/Tuffy.ttf b/htdocs/includes/fonts/Tuffy.ttf deleted file mode 100644 index 8151817be0c..00000000000 Binary files a/htdocs/includes/fonts/Tuffy.ttf and /dev/null differ diff --git a/htdocs/includes/fonts/TuffyBold.ttf b/htdocs/includes/fonts/TuffyBold.ttf deleted file mode 100644 index 2f45b4f1778..00000000000 Binary files a/htdocs/includes/fonts/TuffyBold.ttf and /dev/null differ diff --git a/htdocs/includes/fonts/TuffyBoldItalic.ttf b/htdocs/includes/fonts/TuffyBoldItalic.ttf deleted file mode 100644 index 554faf20211..00000000000 Binary files a/htdocs/includes/fonts/TuffyBoldItalic.ttf and /dev/null differ diff --git a/htdocs/includes/fonts/TuffyItalic.ttf b/htdocs/includes/fonts/TuffyItalic.ttf deleted file mode 100644 index 5f972ec086f..00000000000 Binary files a/htdocs/includes/fonts/TuffyItalic.ttf and /dev/null differ diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 9ac1f1eac7f..05f9a556d43 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -284,8 +284,8 @@ if (! empty($force_install_message)) include_once($dir."/".$file); // Version min of database - $versionbasemin=$class::$versionmin; - $note='('.$class::$label.' >= '.versiontostring($versionbasemin).')'; + $versionbasemin=getStaticMember($class, 'versionmin'); + $note='('.getStaticMember($class, 'label').' >= '.versiontostring($versionbasemin).')'; // Switch to mysql if mysqli is not present if ($defaultype=='mysqli' && !function_exists('mysqli_connect')) $defaultype = 'mysql'; diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index a30e33bb69c..cdac742c2d5 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -200,6 +200,16 @@ INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, act -- Regions Mexique (id country=154) insert into llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) values (15401, 154, 15401, '', 0, 'Mexique', 1); - -- Regions Barbados (id country=46) INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (4601, 46, 4601, '', 0, 'Barbados', 1); + +-- Regions Venezuela (id country=232) +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23201, 232, 23201, '', 0, 'Los Andes', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23202, 232, 23202, '', 0, 'Capital', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23203, 232, 23203, '', 0, 'Central', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23204, 232, 23204, '', 0, 'Cento Occidental', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23205, 232, 23205, '', 0, 'Guayana', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23206, 232, 23206, '', 0, 'Insular', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23207, 232, 23207, '', 0, 'Los Llanos', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23208, 232, 23208, '', 0, 'Nor-Oriental', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index b23a995f59a..bb8691a0a21 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -644,3 +644,30 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SP', 4601, 'Speightstown', 0, 'SP', 'Saint Peter', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SC', 4601, 'Crane', 0, 'SC', 'Saint Philip', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ST', 4601, 'Hillaby', 0, 'ST', 'Saint Thomas', 1); + +-- Provinces Venezuela (id country=232) +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-E', 23201, '', 0, 'VE-E', 'Barinas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-M', 23202, '', 0, 'VE-M', 'Miranda', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-W', 23202, '', 0, 'VE-W', 'Vargas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-A', 23202, '', 0, 'VE-A', 'Distrito Capital', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-D', 23203, '', 0, 'VE-D', 'Aragua', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-G', 23203, '', 0, 'VE-G', 'Carabobo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-I', 23204, '', 0, 'VE-I', 'Falcón', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-K', 23204, '', 0, 'VE-K', 'Lara', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-U', 23204, '', 0, 'VE-U', 'Yaracuy', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-F', 23205, '', 0, 'VE-F', 'Bolívar', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-X', 23205, '', 0, 'VE-X', 'Amazonas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Y', 23205, '', 0, 'VE-Y', 'Delta Amacuro', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-O', 23206, '', 0, 'VE-O', 'Nueva Esparta', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Z', 23206, '', 0, 'VE-Z', 'Dependencias Federales', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-C', 23207, '', 0, 'VE-C', 'Apure', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-J', 23207, '', 0, 'VE-J', 'Guárico', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-H', 23207, '', 0, 'VE-H', 'Cojedes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-P', 23207, '', 0, 'VE-P', 'Portuguesa', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-B', 23208, '', 0, 'VE-B', 'Anzoátegui', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-N', 23208, '', 0, 'VE-N', 'Monagas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-R', 23208, '', 0, 'VE-R', 'Sucre', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1); diff --git a/htdocs/install/mysql/data/llx_c_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql index 4131b172d35..6e67bcb6086 100644 --- a/htdocs/install/mysql/data/llx_c_currencies.sql +++ b/htdocs/install/mysql/data/llx_c_currencies.sql @@ -88,4 +88,4 @@ insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'LK', 'L insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'MU', 'MUR', 1, 'Roupies mauritiennes'); insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'SR', 'SAR', 1, 'Saudi riyal'); insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'MX', 'MXP', 1, 'Pesos Mexicans'); - +insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'VE', 'VEF', 1, 'Venezuelan Bolívar'); diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 097986925a9..aa907c95cc8 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -243,3 +243,7 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (46 INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (462,46, '15','0','VAT 15%',1); INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (463,46, '7.5','0','VAT 7.5%',1); +-- VENEZUELA (id country=232) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2321,232, '0','0','No VAT',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1); diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 16a0d819e33..071bd3afb4d 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -119,3 +119,47 @@ ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0; UPDATE llx_menu SET leftmenu = NULL where leftmenu in ('', '0', '1'); +-- Regions Venezuela (id country=232) +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23201, 232, 23201, '', 0, 'Los Andes', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23202, 232, 23202, '', 0, 'Capital', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23203, 232, 23203, '', 0, 'Central', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23204, 232, 23204, '', 0, 'Cento Occidental', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23205, 232, 23205, '', 0, 'Guayana', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23206, 232, 23206, '', 0, 'Insular', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23207, 232, 23207, '', 0, 'Los Llanos', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23208, 232, 23208, '', 0, 'Nor-Oriental', 1); +INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1); + +-- Provinces Venezuela (id country=232) +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-E', 23201, '', 0, 'VE-E', 'Barinas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-M', 23202, '', 0, 'VE-M', 'Miranda', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-W', 23202, '', 0, 'VE-W', 'Vargas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-A', 23202, '', 0, 'VE-A', 'Distrito Capital', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-D', 23203, '', 0, 'VE-D', 'Aragua', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-G', 23203, '', 0, 'VE-G', 'Carabobo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-I', 23204, '', 0, 'VE-I', 'Falcón', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-K', 23204, '', 0, 'VE-K', 'Lara', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-U', 23204, '', 0, 'VE-U', 'Yaracuy', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-F', 23205, '', 0, 'VE-F', 'Bolívar', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-X', 23205, '', 0, 'VE-X', 'Amazonas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Y', 23205, '', 0, 'VE-Y', 'Delta Amacuro', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-O', 23206, '', 0, 'VE-O', 'Nueva Esparta', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Z', 23206, '', 0, 'VE-Z', 'Dependencias Federales', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-C', 23207, '', 0, 'VE-C', 'Apure', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-J', 23207, '', 0, 'VE-J', 'Guárico', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-H', 23207, '', 0, 'VE-H', 'Cojedes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-P', 23207, '', 0, 'VE-P', 'Portuguesa', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-B', 23208, '', 0, 'VE-B', 'Anzoátegui', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-N', 23208, '', 0, 'VE-N', 'Monagas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-R', 23208, '', 0, 'VE-R', 'Sucre', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1); +-- Currency Venezuela +insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'VE', 'VEF', 1, 'Venezuelan Bolívar'); + +-- VENEZUELA (id country=232) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2321,232, '0','0','No VAT',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1); \ No newline at end of file diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index 65e2182be34..2dbaffd682c 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -248,10 +248,12 @@ Bytes=Bytes KiloBytes=Kilobytes MegaBytes=Megabytes GigaBytes=Gigabytes +TeraBytes=Terabytes b=b. Kb=Kb Mb=Mb Gb=Gb +Tb=Tb Cut=Tallar Copy=Copiar Paste=Pegar @@ -599,6 +601,8 @@ IM=Missatgeria instantània NewAttribute=Nou atribut AttributeCode=Codi atribut OptionalFieldsSetup=Configuració dels atributs opcionals +URLPhoto=Url de la foto/logo +SetLinkToThirdParty=Vincular a un altre tercer CreateDraft=Crea esborrany ClickToEdit=Clic per a editar diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6066b0fc1f1..c1cb76b6c80 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1105,6 +1105,8 @@ LDAPDescValues=Example values are designed for OpenLDAP with following lo ForANonAnonymousAccess=For an authenticated acces (for a write access for example) ##### Products ##### ProductSetup=Products module setup +ServiceSetup=Services module setup +ProductServiceSetup=Products and Services modules setup NumberOfProductShowInSelect=Max number of products in combos select lists (0=no limit) ConfirmDeleteProductLineAbility=Confirmation when removing product lines in forms ModifyProductDescAbility=Personalization of product descriptions in forms diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 4ae7c7e8fad..73c0b56a8c8 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -602,6 +602,7 @@ NewAttribute=New attribute AttributeCode=Attribute code OptionalFieldsSetup=Extra attributes setup URLPhoto=Url of photo/logo +SetLinkToThirdParty=Link to another third party CreateDraft=Create draft ClickToEdit=Click to edit diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index a9301630afa..7dd0d46b5f6 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -248,10 +248,12 @@ Bytes=Bytes KiloBytes=Kilobytes MegaBytes=Megabytes GigaBytes=Gigabytes +TeraBytes=Terabytes b=b. Kb=Kb Mb=Mb Gb=Gb +Tb=Tb Cut=Cortar Copy=Copiar Paste=Pegar @@ -599,6 +601,8 @@ IM=Mensajería instantánea NewAttribute=Nuevo atributo AttributeCode=Código atributo OptionalFieldsSetup=Configuración de los atributos opcionales +URLPhoto=Url de la foto/logo +SetLinkToThirdParty=Vincular a otro tercero CreateDraft=Crear borrador ClickToEdit=Clic para editar diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index e8de43c492e..9ddbd77535b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1111,8 +1111,10 @@ LDAPDescGroups= Cette page permet de définir le nom des attributs de l'arbre LD LDAPDescMembers= Cette page permet de définir le nom des attributs de l'arbre LDAP pour chaque information des membres du module adhérents Dolibarr. LDAPDescValues= Les valeurs exemples sont adaptées à OpenLDAP avec les schémas suivant chargés: core.schema, cosine.schema, inetorgperson.schema). Si vous utilisez les valeurs suggérées et OpenLDAP, modifiez votre fichier de configuration LDAP slapd.conf pour avoir tous ces schémas actifs. ForANonAnonymousAccess= Pour un accès authentifié (pour accès en écriture par exemple) -##### Products ##### +##### Products/Services ##### ProductSetup= Configuration du module Produits +ServiceSetup= Configuration du module Services +ProductServiceSetup= Configuration des modules Produits et Services NumberOfProductShowInSelect= Nombre de produits max dans les listes déroulantes (0=aucune limite) ConfirmDeleteProductLineAbility= Confirmation de suppression d'une ligne produit dans les formulaires ModifyProductDescAbility= Personnalisation des descriptions produits dans les formulaires diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index d5a42c3a6e0..b9884aaf3ad 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -602,6 +602,7 @@ NewAttribute=Nouvel attribut AttributeCode=Code de l'attribut OptionalFieldsSetup=Configuration des attributs complémentaires URLPhoto=Url vers photo/logo +SetLinkToThirdParty=Lier vers un autre tiers CreateDraft=Créer brouillon ClickToEdit=Cliquer ici pour éditer diff --git a/htdocs/product/admin/produit.php b/htdocs/product/admin/produit.php index a158bc5a4b7..dd911ae0bc0 100644 --- a/htdocs/product/admin/produit.php +++ b/htdocs/product/admin/produit.php @@ -1,9 +1,9 @@ +/* Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006-2007 Rodolphe Quiedeville * Copyright (C) 2007 Auguria SARL - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formbarcode.class.php"); $langs->load("admin"); +$langs->load("products"); // Security check if (! $user->admin) accessforbidden(); @@ -91,11 +92,11 @@ if($action) if (! $error) { - $mesg = "".$langs->trans("SetupSaved").""; + $mesg = ''.$langs->trans("SetupSaved").''; } else { - $mesg = "".$langs->trans("Error").""; + $mesg = ''.$langs->trans("Error").''; } } @@ -105,15 +106,28 @@ if($action) $formbarcode=new FormBarCode($db); -llxHeader('',$langs->trans("ProductSetup")); +$title = $langs->trans('ProductServiceSetup'); +$tab = $langs->trans("ProductsAndServices"); +if (empty($conf->produit->enabled)) +{ + $title = $langs->trans('ServiceSetup'); + $tab = $langs->trans('Services'); +} +else if (empty($conf->service->enabled)) +{ + $title = $langs->trans('ProductSetup'); + $tab = $langs->trans('Products'); +} + +llxHeader('',$title); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("ProductSetup"),$linkback,'setup'); +print_fiche_titre($title,$linkback,'setup'); $h = 0; $head[$h][0] = DOL_URL_ROOT."/product/admin/produit.php"; -$head[$h][1] = $langs->trans("Products"); +$head[$h][1] = $tab; $hselected=$h; $h++; @@ -123,9 +137,9 @@ $form=new Form($db); $var=true; print ''; print ''; -print " \n"; -print " \n"; -print " \n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; /* * Formulaire parametres divers @@ -133,16 +147,16 @@ print " \n"; // multiprix activation/desactivation $var=!$var; -print ""; +print ''; print ''; -print ""; -print ""; +print ''; +print ''; print ''; print '"; +print ''; print ''; print ''; @@ -151,12 +165,12 @@ print ''; if($conf->global->PRODUIT_MULTIPRICES) { $var=!$var; - print ""; + print ''; print ''; - print ""; - print ""; + print ''; + print ''; print ''; - print ""; + print ''; print ''; print ''; print ''; @@ -164,31 +178,31 @@ if($conf->global->PRODUIT_MULTIPRICES) // sousproduits activation/desactivation $var=!$var; -print ""; +print ''; print ''; -print ""; -print ""; +print ''; +print ''; print ''; print '"; +print ''; print ''; print ''; // utilisation formulaire Ajax sur choix produit $var=!$var; -print ""; +print ''; print ''; -print ""; -print ""; +print ''; +print ''; print ''; if (! $conf->use_javascript_ajax) { print '"; + print ''; } else { @@ -201,7 +215,7 @@ else print $form->selectarray("activate_usesearchtoselectproduct",$arrval,$conf->global->PRODUIT_USE_SEARCH_TO_SELECT); print '"; + print ''; } print ''; print ''; @@ -209,12 +223,12 @@ print ''; if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { $var=!$var; - print ""; + print ''; print ''; - print ""; - print ""; + print ''; + print ''; print ''; - print ""; + print ''; print ''; print ''; print ''; @@ -222,36 +236,19 @@ if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) // Visualiser description produit dans les formulaires activation/desactivation $var=!$var; -print ""; +print ''; print ''; -print ""; -print ""; +print ''; +print ''; print ''; print '"; +print ''; print ''; print ''; -// Confirmation de suppression d'un ligne produit dans les formulaires activation/desactivation -/* - $var=!$var; - print ""; - print ''; - print ""; - print ""; - print ''; - print '"; - print ''; - print ''; - */ - if ($conf->global->PRODUCT_CANVAS_ABILITY) { // Add canvas feature diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 7c4f6e1323b..1c8c80d8114 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -33,6 +33,7 @@ $langs->load("errors"); $langs->load("users"); $langs->load("companies"); $langs->load("ldap"); +$langs->load("other"); // Security check if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)
".$langs->trans("Parameters")."".$langs->trans("Value")." 
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
 
'.$langs->trans("MultiPricesAbility").''; print $form->selectyesno("activate_multiprix",$conf->global->PRODUIT_MULTIPRICES,1); print ''; print ''; -print "
'.$langs->trans("MultiPricesNumPrices").'global->PRODUIT_MULTIPRICES_LIMIT."\">
'.$langs->trans("AssociatedProductsAbility").''; print $form->selectyesno("activate_sousproduits",$conf->global->PRODUIT_SOUSPRODUITS,1); print ''; print ''; -print "
'.$langs->trans("UseSearchToSelectProduct").''; print $langs->trans("NotAvailableWhenAjaxDisabled"); - print "'; print ''; - print "
'.$langs->trans("NumberOfProductShowInSelect").'global->PRODUIT_LIMIT_SIZE."\">
'.$langs->trans("ViewProductDescInFormAbility").''; print $form->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); print ''; print ''; -print "
'.$langs->trans("ConfirmDeleteProductLineAbility").''; - print $form->selectyesno("activate_confirmDeleteProdLineInForm",$conf->global->PRODUIT_CONFIRM_DELETE_LINE,1); - print ''; - print ''; - print "