diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3b567c794d5..9ecfc338661 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -335,7 +335,7 @@ $tabrowid[29]= ""; // Condition to show dictionary in setup page $tabcond=array(); -$tabcond[1] = true; +$tabcond[1] = (! empty($conf->societe->enabled)); $tabcond[2] = true; $tabcond[3] = true; $tabcond[4] = true; @@ -345,7 +345,7 @@ $tabcond[7] = ! empty($conf->tax->enabled); $tabcond[8] = ! empty($conf->societe->enabled); $tabcond[9] = true; $tabcond[10]= true; -$tabcond[11]= true; +$tabcond[11]= (! empty($conf->societe->enabled)); $tabcond[12]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)); $tabcond[13]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)); $tabcond[14]= (! empty($conf->product->enabled) && ! empty($conf->ecotax->enabled)); diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 794e7c83664..5beaacc8515 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -76,7 +76,7 @@ if ($action == 'addprinter' && $user->admin) if (! $error) { - $result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), $parameter); + $result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); if ($result > 0) $error++; if (! $error) @@ -132,7 +132,7 @@ if ($action == 'updateprinter' && $user->admin) if (! $error) { - $result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), $parameter, $printerid); + $result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); if ($result > 0) $error++; if (! $error) @@ -235,6 +235,7 @@ if ($mode == 'config' && $user->admin) print '
| '.$langs->trans("CONNECTOR_DUMMY").': | '.$langs->trans("CONNECTOR_DUMMY_HELP").' | '.$langs->trans("CONNECTOR_NETWORK_PRINT").': | '.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").' | '; - print ''.$langs->trans("CONNECTOR_FILE_PRINT").': | '.$langs->trans("CONNECTOR_FILE_PRINT_HELP").' | '; - print ''.$langs->trans("CONNECTOR_WINDOWS_PRINT").': | '.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").' | '; - //print ''.$langs->trans("CONNECTOR_JAVA").': | '.$langs->trans("CONNECTOR_JAVA_HELP").' | '; + print '
| '.$langs->trans("CONNECTOR_DUMMY").': | '.$langs->trans("CONNECTOR_DUMMY_HELP").' |
| '.$langs->trans("CONNECTOR_NETWORK_PRINT").': | '.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").' |
| '.$langs->trans("CONNECTOR_FILE_PRINT").': | '.$langs->trans("CONNECTOR_FILE_PRINT_HELP").' |
| '.$langs->trans("CONNECTOR_WINDOWS_PRINT").': | '.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").' |
| '.$langs->trans("CONNECTOR_JAVA").': | '.$langs->trans("CONNECTOR_JAVA_HELP").' |
| '.$langs->trans("PROFILE_DEFAULT").': | '.$langs->trans("PROFILE_DEFAULT_HELP").' |
| '.$langs->trans("PROFILE_SIMPLE").': | '.$langs->trans("PROFILE_SIMPLE_HELP").' |
| '.$langs->trans("PROFILE_EPOSTEP").': | '.$langs->trans("PROFILE_EPOSTEP_HELP").' |
| '.$langs->trans("PROFILE_P822D").': | '.$langs->trans("PROFILE_P822D_HELP").' |
| '.$langs->trans("PROFILE_STAR").': | '.$langs->trans("PROFILE_STAR_HELP").' |
| '; print $langs->trans("Type"); print ' | '; //select_type_actions($selected='',$htmlname='actioncode',$excludetype='',$onlyautoornot=0, $hideinfohelp=0, $multiselect=true) - print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0), 0, 1); + print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), 0, (empty($conf->global->AGENDA_USE_EVENT_TYPE)?0:1)); print ' | |
| ';
print $langs->trans("Status");
diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php
index 4e8a89076df..cd0d563099a 100644
--- a/htdocs/core/modules/modReceiptPrinter.class.php
+++ b/htdocs/core/modules/modReceiptPrinter.class.php
@@ -137,7 +137,7 @@ class modReceiptPrinter extends DolibarrModules
// Clean before activation
$this->remove($options);
$sql = array(
- "CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), fk_type int(11), parameter varchar(128), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
+ "CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), fk_type int(11), fk_profile int(11), parameter varchar(128), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS llx_printer_receipt_template (rowid int(11) NOT NULL AUTO_INCREMENT, name varchar(128), template text, entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
);
return $this->_init($sql,$options);
diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php
index 5997f44714b..82d57514623 100644
--- a/htdocs/core/modules/modResource.class.php
+++ b/htdocs/core/modules/modResource.class.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2015 Laurent Destailleur '.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).' ';
-$out .= ' '.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).' ';
+$out .= ' '.$form->selectyesno('busy',(isset($_POST['busy'])?$_POST['busy']:1),1).' ';
+$out .= ' '.$form->selectyesno('mandatory',(isset($_POST['mandatory'])?$_POST['mandatory']:0),1).' ';
$out .= '';
$out .='';
@@ -33,8 +32,8 @@ $out .= ' ';
$out .='';
$out .= '';
-$out .= ''; +$out .= ' '; print $out; - -// END BEGIN TPL RESOURCE_ADD.TPL.PHP +?> + diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index 3b846e9314c..a5e5ab21919 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -1,3 +1,4 @@ + 0) { $var=true; - // TODO: DEBUT DU TPL + print ' ';
+
if($mode == 'edit' )
- {
- print ' ';
+ {
print '';
- //print ' ';
}
else
{
- print '';
print '';
- //print ' ';
}
@@ -49,11 +47,11 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print '';
print '';
- print ''.$object_resource->type_label.' ';
print ''.$object_resource->getNomUrl(1).' ';
+ print ''.$object_resource->type_label.' ';
print ''.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).' ';
- print ''.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).' ';
- print '';
+ print ''.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).' ';
+ print '';
print '';
}
@@ -65,14 +63,14 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print '';
- print ' ';
-
-
-
-
}
else {
print '';
- print $object_resource->type_label;
- print ' ';
-
print '';
print $object_resource->getNomUrl(1);
print ' ';
+ print '';
+ print $object_resource->type_label;
+ print ' ';
+
print '';
print yn($linked_resource['busy']);
print ' ';
@@ -96,14 +94,12 @@ if( (array) $linked_resources && count($linked_resources) > 0)
}
+
print ''.$langs->trans('NoResourceLinked').' ';
}
-// FIN DU TPL
\ No newline at end of file
+?>
+
diff --git a/htdocs/install/check.php b/htdocs/install/check.php
index 5fa6843978e..3ba9e41c670 100644
--- a/htdocs/install/check.php
+++ b/htdocs/install/check.php
@@ -30,7 +30,7 @@ include_once 'inc.php';
$err = 0;
$allowinstall = 0;
-$allowupgrade = 0;
+$allowupgrade = false;
$checksok = 1;
$setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):$langs->getDefaultLang();
@@ -181,11 +181,11 @@ if (is_readable($conffile) && filesize($conffile) > 8)
if ($databaseok)
{
// Already installed for all parts (config and database). We can propose upgrade.
- $allowupgrade=1;
+ $allowupgrade=true;
}
else
{
- $allowupgrade=0;
+ $allowupgrade=false;
}
}
else
@@ -216,7 +216,7 @@ else
}
// First install, we can't upgrade
- $allowupgrade=0;
+ $allowupgrade=false;
}
@@ -382,6 +382,7 @@ else
$allowupgrade=false;
}
if (defined("MAIN_NOT_INSTALLED")) $allowupgrade=false;
+ if (GETPOST('allowupgrade')) $allowupgrade=true;
$migrationscript=array( array('from'=>'3.0.0', 'to'=>'3.1.0'),
array('from'=>'3.1.0', 'to'=>'3.2.0'),
array('from'=>'3.2.0', 'to'=>'3.3.0'),
diff --git a/htdocs/install/mysql/tables/llx_accounting_account.key.sql b/htdocs/install/mysql/tables/llx_accounting_account.key.sql
index db08831570d..d9f635275b2 100644
--- a/htdocs/install/mysql/tables/llx_accounting_account.key.sql
+++ b/htdocs/install/mysql/tables/llx_accounting_account.key.sql
@@ -21,6 +21,8 @@
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_fk_pcg_version (fk_pcg_version);
ALTER TABLE llx_accounting_account ADD INDEX idx_accounting_account_account_number (account_number);
-ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
+--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_account_number FOREIGN KEY (fk_account_number) REFERENCES llx_accounting_account (account_number);
---ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_account_number FOREIGN KEY (fk_account_number) REFERENCES llx_accounting_account (account_number);
+
+-- This keys are created into foreign table after creation of foreign index
+--ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
diff --git a/htdocs/install/mysql/tables/llx_accounting_system.key.sql b/htdocs/install/mysql/tables/llx_accounting_system.key.sql
index 4d6034cec93..8365c481d81 100644
--- a/htdocs/install/mysql/tables/llx_accounting_system.key.sql
+++ b/htdocs/install/mysql/tables/llx_accounting_system.key.sql
@@ -20,3 +20,5 @@
ALTER TABLE llx_accounting_system ADD UNIQUE INDEX uk_accounting_system_pcg_version (pcg_version);
+-- This key is for another table but created here because must be done after foreign key index is created
+ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php
index 2651c45c05c..f880da8b854 100644
--- a/htdocs/install/step5.php
+++ b/htdocs/install/step5.php
@@ -167,6 +167,17 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
// Create user
include_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php';
+ // Set default encryption to yes if there is no user yet into database
+ $sql = "SELECT u.rowid, u.pass, u.pass_crypted";
+ $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
+ //$sql.= " WHERE u.pass IS NOT NULL AND LENGTH(u.pass) < 32"; // Not a MD5 value
+ $resql=$db->query($sql);
+ if ($resql)
+ {
+ $numrows=$db->num_rows($resql);
+ if ($numrows == 0) dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1",'chaine',0,'',$conf->entity);
+ }
+
$createuser=new User($db);
$createuser->id=0;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 892aa415c92..5dfcf89a0b6 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1673,7 +1673,7 @@ SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade desc
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature.
ConfFileMuseContainCustom=Installing an external module from application save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to have option- $dolibarr_main_url_root_alt enabled to value $dolibarr_main_url_root_alt="/custom" - $dolibarr_main_document_root_alt enabled to value "%s/custom" HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over -HighlightLinesColor=Color of highlight line when mouse move passes over (keep empty for no highlight) +HighlightLinesColor=Highlight color of the line when the mouse passes over (keep empty for no highlight) LinkColor=Color of links PressF5AfterChangingThis=Press F5 on keyboard after changing this value to have it effective NotSupportedByAllThemes=Will works with eldy theme but is not supported by all themes diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang index dc2cd392c20..28b63d7de79 100644 --- a/htdocs/langs/en_US/receiptprinter.lang +++ b/htdocs/langs/en_US/receiptprinter.lang @@ -3,6 +3,12 @@ PrinterAdded=Printer %s added PrinterUpdated=Printer %s updated PrinterDeleted=Printer %s deleted TestSentToPrinter=Test Sent To Printer %s +ReceiptPrinterDesc=Setup of printers +ReceiptPrinterTemplateDesc=Setup of Templates +ReceiptPrinterTypeDesc=Description of Receipt Printer's type +ReceiptPrinterProfileDesc=Description of Receipt Printer's Profile +ListPrinters=List of Printers +SetupReceiptTemplate=Template Setup CONNECTOR_DUMMY=Dummy Printer CONNECTOR_NETWORK_PRINT=Network Printer CONNECTOR_FILE_PRINT=Local Printer @@ -11,6 +17,16 @@ CONNECTOR_DUMMY_HELP=Fake Printer for test, does nothing CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer +PROFILE_DEFAULT=Default Profile +PROFILE_SIMPLE=Simple Profile +PROFILE_EPOSTEP=Epos Tep Profile +PROFILE_P822D=P822D Profile +PROFILE_STAR=Star Profile +PROFILE_DEFAULT_HELP=Default Profile suitable for Epson printers +PROFILE_SIMPLE_HELP=Simple Profile No Graphics +PROFILE_EPOSTEP_HELP=Epos Tep Profile Help +PROFILE_P822D_HELP=P822D Profile No Graphics +PROFILE_STAR_HELP=Star Profile DOL_ALIGN_LEFT=Left align text DOL_ALIGN_CENTER=Center text DOL_ALIGN_RIGHT=Right align text diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index c89edddec4b..cdff0391c30 100644 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -17,6 +17,7 @@ ResourceFormLabel_description=Resource description ResourcesLinkedToElement=Resources linked to element +ShowResource=Show resource ShowResourcePlanning=Show resource planning GotoDate=Go to date diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index b0f0935d674..298889649df 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1655,15 +1655,16 @@ SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe depuis l'application a été désactivé par l'administrator. Vous devez lui demander de supprimer le fichier %s pour permettre cette fonctionnalité. ConfFileMuseContainCustom=Installé un module externe pour l'application enregistre les fichiers de module dans le répertoire %s. Pour avoir ce répertoire vu par Dolibarr, vous devez configurer votre conf/conf.php d'avoir l'option - $dolibarr_main_url_root_alt activé à la valeur $dolibarr_main_url_root_alt="/custom" - $dolibarr_main_document_root_alt activé à la valeur "%s/custom" HighlightLinesOnMouseHover=Mettez en surbrillance les lignes de la table lorsque la souris passe au-dessus -HighlightLinesColor=Color of highlight line when mouse move passes over (keep empty for no highlight) +HighlightLinesColor=Couleur de surbrillance de la ligne quand la souris passe au dessus (garder vide pour ne pas avoir de surbrillance) +LinkColor=Couleur des liens PressF5AfterChangingThis=Appuyez sur F5 sur le clavier après avoir modifié cette valeur pour que le changement soit effectif NotSupportedByAllThemes=Fonctionne avec le thème eldy mais n'est pas pris en charge par tous les thèmes BackgroundColor=Couleur de fond -TopMenuBackgroundColor=Couleur de fond pour le menu Gauche +TopMenuBackgroundColor=Couleur de fond pour le menu Haut LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche -BackgroundTableTitleColor=Background color for Table title line +BackgroundTableTitleColor=Couleur de fond pour la ligne de titre des tables BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables -BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales +BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tables MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai) NbAddedAutomatically=Nombre de jours ajoutés aux compteurs des utilisateurs (automatiquement) chaque mois EnterAnyCode=Ce champ contient une référence pour identifier le champ. Entrez une valeur de votre choix, mais sans caractères spéciaux. diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index 3618230a374..f509bc82759 100644 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Alexandre Spangaro '.$langs->trans("ResourceType").' | ';
print '';
- $ret = $formresource->select_types_resource($object->fk_code_type_resource,'fk_code_type_resource','',2);
+ $ret = $formresource->select_types_resource($object->fk_code_type_resource, 'fk_code_type_resource', '', 2, 1);
print ' | ',
'',
- ' ',
+ ' ',
'',
' ';
diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php
index 08881341429..3cb96dc53a3 100644
--- a/htdocs/resource/class/resource.class.php
+++ b/htdocs/resource/class/resource.class.php
@@ -79,7 +79,7 @@ class Resource extends CommonObject
// Insert request
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
- $sql.= " entity,";
+ $sql.= "entity,";
$sql.= "ref,";
$sql.= "description,";
$sql.= "fk_code_type_resource,";
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index d8bbe966843..899e8340543 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -2606,6 +2606,7 @@ div.ok {
color: #114466;
}
+/* Warning message */
div.warning {
color: #302020;
padding: 0.3em 0.3em 0.3em 0.3em;
@@ -2618,14 +2619,7 @@ div.warning {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
-div.error {
- color: #550000; font-weight: bold;
- padding: 0.3em 0.3em 0.3em 0.3em;
- margin: 0.5em 0em 0.5em 0em;
- border: 1px solid #DC9CAB;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
+/* Error message */
background: #EFCFCF;
}
@@ -2642,6 +2636,9 @@ div.info {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
+div.warning a, div.info a, div.error a {
+ color: rgb();
+}
/*
* Liens Payes/Non payes
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 7a42ab1f3bb..e316f078b24 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2464,6 +2464,7 @@ div.ok {
color: #114466;
}
+/* Warning message */
div.warning {
color: #302020;
padding: 0.3em 0.3em 0.3em 0.3em;
@@ -2476,6 +2477,7 @@ div.warning {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
+/* Error message */
div.error {
color: #550000; font-weight: bold;
padding: 0.3em 0.3em 0.3em 0.3em;
@@ -2500,6 +2502,9 @@ div.info {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
+div.warning a, div.info a, div.error a {
+ color: rgb();
+}
/*
* Liens Payes/Non payes
|