diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index ce75d83505a..f8b9556cf89 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -181,6 +181,13 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) } } + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FACEBOOK_URL", GETPOST("facebookurl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TWITTER_URL", GETPOST("twitterurl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LINKEDIN_URL", GETPOST("linkedinurl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_INSTAGRAM_URL", GETPOST("instagramurl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_YOUTUBE_URL", GETPOST("youtubeurl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GITHUB_URL", GETPOST("githuburl", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS", 'nohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_GDPR", GETPOST("MAIN_INFO_GDPR", 'nohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital", 'nohtml'), 'chaine', 0, '', $conf->entity); @@ -407,32 +414,26 @@ print ''; print ''."\n"; // Name - print ''."\n"; -// Addresse - +// Address print ''."\n"; - print ''."\n"; - print ''."\n"; // Country - print ''."\n"; - print ''."\n"; - +// Currency print ''."\n"; - +// Phone print ''; print ''."\n"; - +// Fax print ''; print ''."\n"; - +// Email print ''; print ''."\n"; @@ -516,6 +517,45 @@ print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>
'; print '
'; print '
'; print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization print $form->select_country($mysoc->country_id, 'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
'; $state_id = 0; if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) @@ -443,22 +444,22 @@ if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) $formcompany->select_departement($state_id, $mysoc->country_code, 'state_id'); print '
'; print $form->selectCurrency($conf->currency, "currency"); print '
'; print '
'; print '
'; print '
'; +// Social networks +print '
'; +print ''; +print ''; +print ''; +print "\n"; + +// Facebook +print ''; +print ''."\n"; + +// Twitter +print ''; +print ''."\n"; + +// LinkedIn +print ''; +print ''."\n"; + +// Instagram +print ''; +print ''."\n"; + +// Youtube +print ''; +print ''."\n"; + +// Github +print ''; +print ''."\n"; + +print "
'.$langs->trans("SocialNetworksInformation").''.$langs->trans("Value").'
'; +print '
'; +print '
'; +print '
'; +print '
'; +print '
'; +print '
"; + print '
'; // IDs of the company (country-specific) @@ -525,24 +565,20 @@ print ''.$langs->trans("CompanyId $langs->load("companies"); // Managing Director(s) - print ''; print ''; // GDPR contact - print ''; print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc")); print ''; print ''; // Capital - print ''; print ''; // Juridical Status - print ''; if ($mysoc->country_code) { print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); @@ -551,7 +587,7 @@ if ($mysoc->country_code) { } print ''; -// ProfID1 +// ProfId1 if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') { print ''; @@ -641,14 +677,12 @@ if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') print ''; } -// TVA Intra - +// Intra-community VAT number print ''; print ''; print ''; // Object of the company - print ''; print ''; print ''; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 747096e852a..1ea817709e1 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2019 Philippe Grand - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -119,7 +119,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $form = new Form($this->db); $texte = $this->description.".
\n"; - $texte .= '
'; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -177,7 +177,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } $texte .= ''; } - + // Add input to upload a new template file. + $texte .= '
'.$langs->trans("UploadNewTemplate").' '; + $texte .= ''; + $texte .= ''; + $texte .= '
'; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index a6e28214335..ef05b9b2df9 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -118,7 +118,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $form = new Form($this->db); $texte = $this->description.".
\n"; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -176,7 +176,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures } $texte .= ''; } - + // Add input to upload a new template file. + $texte .= '
'.$langs->trans("UploadNewTemplate").' '; + $texte .= ''; + $texte .= ''; + $texte .= '
'; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index cafacc6ac57..2a7e0cf287f 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Charlie Benke - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * 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 @@ -100,7 +100,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc $form = new Form($this->db); $texte = $this->description.".
\n"; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= ''; @@ -160,7 +160,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc } $texte .= ''; } - + // Add input to upload a new template file. + $texte .= '
'.$langs->trans("UploadNewTemplate").' '; + $texte .= ''; + $texte .= ''; + $texte .= '
'; $texte .= ''; $texte .= ''; diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index d95cdc0772e..78f474ff96a 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -406,6 +406,13 @@ AllocateCommercial=Assigned to sales representative Organization=Organization FiscalYearInformation=Fiscal Year FiscalMonthStart=Starting month of the fiscal year +SocialNetworksInformation=Social networks +SocialNetworksFacebookURL=Facebook URL +SocialNetworksTwitterURL=Twitter URL +SocialNetworksLinkedinURL=Linkedin URL +SocialNetworksInstagramURL=Instagram URL +SocialNetworksYoutubeURL=Youtube URL +SocialNetworksGithubURL=Github URL YouMustAssignUserMailFirst=You must create an email for this user prior to being able to add an email notification. YouMustCreateContactFirst=To be able to add email notifications, you must first define contacts with valid emails for the third party ListSuppliersShort=List of Vendors diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c4a0ab64afa..ea5a9a39eda 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3637,6 +3637,15 @@ class Societe extends CommonObject $this->phone = empty($conf->global->MAIN_INFO_SOCIETE_TEL) ? '' : $conf->global->MAIN_INFO_SOCIETE_TEL; $this->fax = empty($conf->global->MAIN_INFO_SOCIETE_FAX) ? '' : $conf->global->MAIN_INFO_SOCIETE_FAX; $this->url = empty($conf->global->MAIN_INFO_SOCIETE_WEB) ? '' : $conf->global->MAIN_INFO_SOCIETE_WEB; + + // Social networks + $this->facebook_url = empty($conf->global->MAIN_INFO_SOCIETE_FACEBOOK_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_FACEBOOK_URL; + $this->twitter_url = empty($conf->global->MAIN_INFO_SOCIETE_TWITTER_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_TWITTER_URL; + $this->linkedin_url = empty($conf->global->MAIN_INFO_SOCIETE_LINKEDIN_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_LINKEDIN_URL; + $this->instagram_url = empty($conf->global->MAIN_INFO_SOCIETE_INSTAGRAM_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_INSTAGRAM_URL; + $this->youtube_url = empty($conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL; + $this->github_url = empty($conf->global->MAIN_INFO_SOCIETE_GITHUB_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_GITHUB_URL; + // Id prof generiques $this->idprof1 = empty($conf->global->MAIN_INFO_SIREN) ? '' : $conf->global->MAIN_INFO_SIREN; $this->idprof2 = empty($conf->global->MAIN_INFO_SIRET) ? '' : $conf->global->MAIN_INFO_SIRET;