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 ''.$langs->trans("CompanyInfo").' '.$langs->trans("Value").' '."\n";
// Name
-
print ''.$langs->trans("CompanyName").' ';
print ' global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'> '."\n";
-// Addresse
-
+// Address
print ''.$langs->trans("CompanyAddress").' ';
print ' '."\n";
-
print ''.$langs->trans("CompanyZip").' ';
print ' '."\n";
-
print ''.$langs->trans("CompanyTown").' ';
print ' '."\n";
// Country
-
print ''.$langs->trans("Country").' ';
//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 ' '."\n";
-
print ''.$langs->trans("State").' ';
$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 ' '."\n";
-
+// Currency
print ''.$langs->trans("CompanyCurrency").' ';
print $form->selectCurrency($conf->currency, "currency");
print ' '."\n";
-
+// Phone
print ''.$langs->trans("Phone").' ';
print ' ';
print ''."\n";
-
+// Fax
print ''.$langs->trans("Fax").' ';
print ' ';
print ''."\n";
-
+// Email
print ''.$langs->trans("EMail").' ';
print ' ';
print ''."\n";
@@ -516,6 +517,45 @@ print '';
print '
';
+// Social networks
+print ' ';
+print '";
+
print ' ';
// IDs of the company (country-specific)
@@ -525,24 +565,20 @@ print ''.$langs->trans("CompanyId
$langs->load("companies");
// Managing Director(s)
-
print ' '.$langs->trans("ManagingDirectors").' ';
print ' ';
// GDPR contact
-
print '';
print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
print ' ';
print ' ';
// Capital
-
print ''.$langs->trans("Capital").' ';
print ' ';
// Juridical Status
-
print ''.$langs->trans("JuridicalStatus").' ';
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 ''.$langs->transcountry("ProfId1", $mysoc->country_code).' ';
@@ -641,14 +677,12 @@ if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-')
print ' ';
}
-// TVA Intra
-
+// Intra-community VAT number
print ''.$langs->trans("VATIntra").' ';
print ' ';
print ' ';
// Object of the company
-
print ''.$langs->trans("CompanyObject").' ';
print ' ';
print '';
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 7439972e906..d34109961d3 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;