diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f204c535089..a854c706c4c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7314,10 +7314,8 @@ abstract class CommonObject $out .= ajax_combobox($keyprefix.$key.$keysuffix, array(), 0); } - $out .= ''; + if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1) || $nbchoice >= 2) { + $out .= ''; + } + $out .= $tmpselect; $out .= ''; } elseif ($type == 'sellist') { $out = ''; diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 6030f23cbd4..237e5086a30 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -38,8 +38,6 @@ class modOpenSurvey extends DolibarrModules */ public function __construct($db) { - global $langs, $conf; - $this->db = $db; // Id for module (must be unique). @@ -181,8 +179,6 @@ class modOpenSurvey extends DolibarrModules */ public function init($options = '') { - global $conf, $langs; - $result = $this->_load_tables('/install/mysql/', 'opensurvey'); if ($result < 0) { return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index 383996d4345..ed237feadf6 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -40,7 +40,7 @@ class modTakePos extends DolibarrModules */ public function __construct($db) { - global $langs, $conf; + global $conf; $this->db = $db; @@ -54,7 +54,7 @@ class modTakePos extends DolibarrModules // It is used to group modules by family in module setup page $this->family = "portal"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '60'; + $this->module_position = '45'; // Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); @@ -120,8 +120,8 @@ class modTakePos extends DolibarrModules //1=>array('TAKEPOS_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1) ); - - if (!isset($conf->takepos) || !isset($conf->takepos->enabled)) { + // To avoid warning + if (!isModEnabled('takepos')) { $conf->takepos = new stdClass(); $conf->takepos->enabled = 0; } diff --git a/htdocs/webportal/core/modules/modWebPortal.class.php b/htdocs/core/modules/modWebPortal.class.php similarity index 94% rename from htdocs/webportal/core/modules/modWebPortal.class.php rename to htdocs/core/modules/modWebPortal.class.php index dd088dcd2e8..6bd2885f31a 100644 --- a/htdocs/webportal/core/modules/modWebPortal.class.php +++ b/htdocs/core/modules/modWebPortal.class.php @@ -53,7 +53,7 @@ class modWebPortal extends DolibarrModules $this->family = "portal"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '80'; + $this->module_position = '47'; // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); @@ -139,7 +139,7 @@ class modWebPortal extends DolibarrModules $this->conflictwith = array(); // The language file dedicated to your module - $this->langfiles = array("webportal@webportal"); + $this->langfiles = array("website"); // Prerequisites $this->phpmin = array(7, 0); // Minimum version of PHP required by module @@ -165,7 +165,8 @@ class modWebPortal extends DolibarrModules 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' )*/ - if (!isset($conf->webportal) || !isset($conf->webportal->enabled)) { + // To avoid warnings + if (isModEnabled('webportal')) { $conf->webportal = new stdClass(); $conf->webportal->enabled = 0; } @@ -202,7 +203,7 @@ class modWebPortal extends DolibarrModules $this->dictionaries = array(); /* Example: $this->dictionaries=array( - 'langs'=>'webportal@webportal', + 'langs'=>'website', // List of tables we want to see into dictonnary editor 'tabname'=>array("table1", "table2", "table3"), // Label of tables @@ -287,7 +288,7 @@ class modWebPortal extends DolibarrModules 'mainmenu' => 'webportal', 'leftmenu' => '', 'url' => getDolGlobalString('WEBPORTAL_ROOT_URL', '/public/webportal/index.php'), - 'langs' => 'webportal@webportal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs' => 'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position' => 1000 + $r, 'enabled' => 'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled. 'perms' => '1', // Use 'perms'=>'$user->hasRight("webportal", "webportalpropal", "read")' if you want your menu with a permission rules @@ -302,7 +303,7 @@ class modWebPortal extends DolibarrModules 'mainmenu'=>'webportal', 'leftmenu'=>'webportalpropal', 'url'=>'/webportal/webportalindex.php', - 'langs'=>'webportal@webportal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled. 'perms'=>'$user->hasRight("webportal", "webportalpropal", "read")', @@ -316,7 +317,7 @@ class modWebPortal extends DolibarrModules 'mainmenu'=>'webportal', 'leftmenu'=>'webportal_webportalpropal_list', 'url'=>'/webportal/webportalpropal_list.php', - 'langs'=>'webportal@webportal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled. 'perms'=>'$user->hasRight("webportal", "webportalpropal", "read")' @@ -330,7 +331,7 @@ class modWebPortal extends DolibarrModules 'mainmenu'=>'webportal', 'leftmenu'=>'webportal_webportalpropal_new', 'url'=>'/webportal/webportalpropal_card.php?action=create', - 'langs'=>'webportal@webportal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'$user->hasRight("webportal", "webportalpropal", "write")' @@ -349,7 +350,7 @@ class modWebPortal extends DolibarrModules */ public function init($options = '') { - global $conf, $langs; + //global $conf, $langs; //$result = $this->_load_tables('/install/mysql/', 'webportal'); $result = $this->_load_tables('/webportal/sql/'); @@ -360,11 +361,11 @@ class modWebPortal extends DolibarrModules // Create extrafields during init //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; //$extrafields = new ExtraFields($this->db); - //$result1=$extrafields->addExtraField('webportal_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'webportal@webportal', 'isModEnabled("webportal")'); - //$result2=$extrafields->addExtraField('webportal_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'webportal@webportal', 'isModEnabled("webportal")'); - //$result3=$extrafields->addExtraField('webportal_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'webportal@webportal', 'isModEnabled("webportal")'); - //$result4=$extrafields->addExtraField('webportal_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'webportal@webportal', 'isModEnabled("webportal")'); - //$result5=$extrafields->addExtraField('webportal_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'webportal@webportal', 'isModEnabled("webportal")'); + //$result1=$extrafields->addExtraField('webportal_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'website', 'isModEnabled("webportal")'); + //$result2=$extrafields->addExtraField('webportal_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'website', 'isModEnabled("webportal")'); + //$result3=$extrafields->addExtraField('webportal_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'website', 'isModEnabled("webportal")'); + //$result4=$extrafields->addExtraField('webportal_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'website', 'isModEnabled("webportal")'); + //$result5=$extrafields->addExtraField('webportal_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'website', 'isModEnabled("webportal")'); // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 6a21435b489..a1a573553b3 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -37,8 +37,6 @@ class modWebsite extends DolibarrModules */ public function __construct($db) { - global $langs, $conf; - $this->db = $db; $this->numero = 10000; diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 58d285b577d..b64930a8855 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -161,5 +161,76 @@ Visibility=Visibility Everyone=Everyone AssignedContacts=Assigned contacts WebsiteTypeLabel=Type of Web site -WebsiteTypeDolibarrWebsite=Web site (CMS Dolibarr) -WebsiteTypeDolibarrPortal=Native Dolibarr portal +WebsiteTypeDolibarrWebsite=Web site (Module WebSite) +WebsiteTypeDolibarrPortal=Native and ready to use web portal (Module WebPortal) +WebPortalURL=Web portal URL +NewWebsiteAccount=New accounts for websites + + +ModuleWebPortalName = Web portal +ModuleWebPortalDesc = A ready to use native web portal for customers, suppliers, partners or members +WebPortalDescription = Public web portal module for membership and partnership +WebPortalSetup = WebPortal setup +WebPortalCSS=Web portal CSS +Settings = Settings +WebPortalSetupPage = WebPortal setup page +WEBPORTAL_ROOT_URL = Alternative virtual host URL +WebPortalRootUrlHelp = Public access url (http or https) if you have a virtual host or keep empty +WEBPORTAL_TITLE = Brand name on header of public page +UserAccountForWebPortalAreInThirdPartyTabHelp = Users accounts for WebPortal can be set on each third party card in Website accounts tab +WebPortalAccessHidden = Hidden +WebPortalAccessVisible = Visible +WebPortalAccessEdit = Editable +WEBPORTAL_MEMBER_CARD_ACCESS = Enable access to the membership record +WebPortalMemberCardAccessHelp = Enable access to the membership record (Hidden / Visible or Editable) +WEBPORTAL_PARTNERSHIP_CARD_ACCESS = Enable access to the partnership record +WebPortalPartnerShipCardAccessHelp = Enable access to the partnership record (Hidden / Visible or Editable) +WEBPORTAL_PROPAL_LIST_ACCESS = Enable access to the proposals +WEBPORTAL_ORDER_LIST_ACCESS = Enable access to the orders +WEBPORTAL_INVOICE_LIST_ACCESS = Enable access to the invoices +WEBPORTAL_USER_LOGGED = Select a user +WebPortalUserLoggedHelp = This user is used to update cards +WebPortalHomeTitle = Welcome +WebPortalHomeDesc = Welcome to the public interface +WebPortalPropalListMenu = Proposals +WebPortalPropalListTitle = List of proposals +WebPortalPropalListDesc = List of proposals +WebPortalPropalListNothing = Proposals not found +WebPortalOrderListMenu = Orders +WebPortalOrderListTitle = List of orders +WebPortalOrderListDesc = List of orders +WebPortalOrderListNothing = Orders not found +WebPortalInvoiceListMenu = Invoices +WebPortalInvoiceListTitle = List of invoices +WebPortalInvoiceListDesc = List of invoices +WebPortalInvoiceListNothing = Invoices not found +WebPortalMemberCardMenu = Member +WebPortalMemberCardTitle = Member card +WebPortalMemberCardDesc = Member card +WebPortalPartnershipCardMenu = Partnership +WebPortalPartnershipCardTitle = Partnership card +WebPortalPartnershipCardDesc = Partnership card +loginWebportalUserName = User name / email +loginWebportalPassword = Password +LoginNow = Login now +RemoveSearchFilters = Remove search filters +WEBPORTAL_PRIMARY_COLOR = Primary color +WEBPORTAL_SECONDARY_COLOR = Secondary color +WEBPORTAL_LOGIN_LOGO_URL = Login logo image URL +WEBPORTAL_MENU_LOGO_URL = Menu logo image URL +WEBPORTAL_MENU_LOGO_URLTooltip = Leave empty to use login logo +WEBPORTAL_LOGIN_BACKGROUND = Background login image URL +WEBPORTAL_BANNER_BACKGROUND = Background for banner +WEBPORTAL_BANNER_BACKGROUND_IS_DARK = Use dark theme for banner +AriaPrevPage = Previous page +AriaNextPage = Next page +AriaPageX = Page %s +WebPortalError404 = Page not found +WebPortalErrorPageNotExist = Page not exist +WebPortalErrorFetchThirdPartyAccountFromLogin = Error when loading third-party account (login : %s) +WebPortalErrorAuthentication = Authentication error +WebPortalErrorFetchLoggedThirdPartyAccount = Error when loading third-party account (login : %s) +WebPortalErrorFetchLoggedUser = Error when loading user (Id : %s) +WebPortalErrorFetchLoggedThirdParty = Error when loading third-party (Id : %s) +WebPortalErrorFetchLoggedMember = Error when loading member (Id : %s) +WebPortalErrorFetchLoggedPartnership = Error when loading partnership (Third-party Id : %s, Member Id : %s) diff --git a/htdocs/modulebuilder/README.md b/htdocs/modulebuilder/README.md index 26b0ecf717b..fa3752f7ceb 100644 --- a/htdocs/modulebuilder/README.md +++ b/htdocs/modulebuilder/README.md @@ -2,7 +2,7 @@ Module Builder ============== This is a module to provide embedded tools to develop your own application/features inside Dolibarr ERP CRM software. -It provide tools for module developers to kickstart their project and give an hands-on sample of which features Dolibarr +It provides tools for module developers to kickstart their project and give an hands-on sample of which features Dolibarr has to offer for module development. If you don't need to develop your own module/application, you just don't need this. diff --git a/htdocs/public/webportal/webportal.main.inc.php b/htdocs/public/webportal/webportal.main.inc.php index 5068317b455..667c8f340eb 100644 --- a/htdocs/public/webportal/webportal.main.inc.php +++ b/htdocs/public/webportal/webportal.main.inc.php @@ -85,7 +85,7 @@ if (!defined('WEBPORTAL_NOREQUIRETRAN') || (!defined('WEBPORTAL_NOLOGIN') && !em } $langs->setDefaultLang($langcode); } - $langs->loadLangs(array('webportal@webportal', 'main')); + $langs->loadLangs(array('website', 'main')); } /* @@ -227,7 +227,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access $langs = new Translate("", $conf); $langs->setDefaultLang($logged_thirdparty->default_lang); } - $langs->loadLangs(array('webportal@webportal', 'main')); + $langs->loadLangs(array('website', 'main')); } $context->logged_user = $logged_user; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 04ca7bad2c8..2547a9c00c4 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -172,7 +172,7 @@ class SocieteAccount extends CommonObject */ public function __construct(DoliDB $db) { - global $conf, $langs; + global $langs; $this->db = $db; diff --git a/htdocs/webportal/README.md b/htdocs/webportal/README.md index e1e4064009e..0dddedea0eb 100644 --- a/htdocs/webportal/README.md +++ b/htdocs/webportal/README.md @@ -1 +1,45 @@ -Public web portal module for membership and partnership \ No newline at end of file +Module Web Portal +================ + +This is a module to provide a ready to use Web Portal for your customers, suppliers, partners or members of the mebership module. + +Accounts (login and pass) to acces this portal can be created for any thirdparty (from the tab "Web site accounts"). + +It is better to have a standalone web server with its own virtual host and domain name to use this module, so using the web portal does not +reaveal the domain and url of your backoffice installation. + + +It provides an interface to read or modify its data. This is for example, the list of the data than can be read (or modified): + +If the Thirdparty module is enabled: +* Read/modify Name, phone, email, addresses of thirdparty + +If the Patnership module is enabled: +* Read properties (status, stard date, end date) of its partnership. + +If the Proposal module is enabled: +* Read its orders + +If the Sale Order module is enabled: +* Read its orders + +If the Invoice module is enabled: +* Read its invoices + +If the Supplier module is enabled: +* Read its price requests +* Read its orders +* Read its invoices + +If module Membership is enabled: +* Read/modify Name, phone, email, addresses of thirdparty +* Read its membership status (start and end date, amount paid) + + + +Documentation +------------- + +[Module Web Portal](https://wiki.dolibarr.org/index.php/Module_Web_Portal) + + \ No newline at end of file diff --git a/htdocs/webportal/admin/setup.php b/htdocs/webportal/admin/setup.php index d0870bb54de..334a97336cd 100644 --- a/htdocs/webportal/admin/setup.php +++ b/htdocs/webportal/admin/setup.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php"; require_once DOL_DOCUMENT_ROOT . "/webportal/lib/webportal.lib.php"; // Translations -$langs->loadLangs(array("admin", "webportal")); +$langs->loadLangs(array("admin", "webportal", "website")); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('webportalsetup', 'globalsetup')); @@ -38,10 +38,6 @@ $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php -if (empty($action)) { - $action = 'edit'; -} - $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -70,7 +66,7 @@ $item->fieldAttr = array('placeholder' => 'https://'); $item->helpText = $langs->transnoentities('WebPortalRootUrlHelp'); require_once __DIR__ . '/../class/context.class.php'; $context = Context::getInstance(); -$item->fieldOutputOverride = ''.img_picto('', 'globe', 'class="pictofixedwidth"').Context::getRootConfigUrl().''; +//$item->fieldOutputOverride = ''.img_picto('', 'globe', 'class="pictofixedwidth"').Context::getRootConfigUrl().''; $formSetup->newItem('WEBPORTAL_TITLE')->defaultFieldValue = getDolGlobalString('MAIN_INFO_SOCIETE_NOM'); @@ -228,6 +224,7 @@ if (empty($action) || $action == 'update') { $action = 'edit'; } + /* * View */ @@ -248,9 +245,33 @@ print load_fiche_titre($langs->trans($title), $linkback, 'title_setup'); $head = webportalAdminPrepareHead(); print dol_get_fiche_head($head, 'settings', $langs->trans($title), -1, "webportal"); +print '
'; + +// URL For webportal +print img_picto('', 'globe').' '.$langs->trans('WebPortalURL').'
'; +if (isModEnabled('multicompany')) { + $entity_qr = '?entity='.((int) $conf->entity); +} else { + $entity_qr = ''; +} + +// Define $urlwithroot +$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); +$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file +//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + +print ''; +print ajax_autoselect('publicurlmember'); +//print ''.img_picto('', 'globe', 'class="pictofixedwidth"').Context::getRootConfigUrl().''; + // Setup page goes here print info_admin($langs->trans("UserAccountForWebPortalAreInThirdPartyTabHelp")); +print '
'; + if ($action == 'edit') { print $formSetup->generateOutput(true); print '
'; diff --git a/htdocs/webportal/admin/setup_theme.php b/htdocs/webportal/admin/setup_theme.php index df6a3467a7d..1e751389fea 100644 --- a/htdocs/webportal/admin/setup_theme.php +++ b/htdocs/webportal/admin/setup_theme.php @@ -124,7 +124,7 @@ $head = webportalAdminPrepareHead(); print dol_get_fiche_head($head, 'themesettings', $langs->trans($title), -1, "webportal"); // Setup page goes here -print info_admin($langs->trans("UserAccountForWebPortalAreInThirdPartyTabHelp")); +//print info_admin($langs->trans("UserAccountForWebPortalAreInThirdPartyTabHelp")); if ($action == 'edit') { print $formSetup->generateOutput(true); diff --git a/htdocs/webportal/class/html.formcardwebportal.class.php b/htdocs/webportal/class/html.formcardwebportal.class.php index 1ac702e871e..a416cd70003 100644 --- a/htdocs/webportal/class/html.formcardwebportal.class.php +++ b/htdocs/webportal/class/html.formcardwebportal.class.php @@ -161,7 +161,7 @@ class FormCardWebPortal dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php'); // Load translation files required by the page - $langs->loadLangs(array('webportal@webportal', 'other')); + $langs->loadLangs(array('website', 'other')); // Get parameters //$id = $id > 0 ? $id : GETPOST('id', 'int'); diff --git a/htdocs/webportal/langs/en_US/webportal.lang b/htdocs/webportal/langs/en_US/webportal.lang deleted file mode 100644 index 13a19ba4731..00000000000 --- a/htdocs/webportal/langs/en_US/webportal.lang +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) 2023-2024 Lionel Vessiller -# -# 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 -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Generic -# - -# Module label 'ModuleWebPortalName' -ModuleWebPortalName = Web portal -# Module description 'ModuleWebPortalDesc' -ModuleWebPortalDesc = Public web portal -WebPortalDescription = Public web portal module for membership and partnership - -# -# Admin page -# -WebPortalSetup = WebPortal setup -WebPortalCSS=Web portal CSS -Settings = Settings -WebPortalSetupPage = WebPortal setup page -WEBPORTAL_ROOT_URL = Public access url -WebPortalRootUrlHelp = Public access url (http or https) if you have a virtual host or keep empty -WEBPORTAL_TITLE = Brand name on header of public page -UserAccountForWebPortalAreInThirdPartyTabHelp = Users accounts for WebPortal can be set on each third party card in Website accounts tab -WebPortalAccessHidden = Hidden -WebPortalAccessVisible = Visible -WebPortalAccessEdit = Editable -WEBPORTAL_MEMBER_CARD_ACCESS = Enable access to the membership record -WebPortalMemberCardAccessHelp = Enable access to the membership record (Hidden / Visible or Editable) -WEBPORTAL_PARTNERSHIP_CARD_ACCESS = Enable access to the partnership record -WebPortalPartnerShipCardAccessHelp = Enable access to the partnership record (Hidden / Visible or Editable) -WEBPORTAL_PROPAL_LIST_ACCESS = Enable access to the proposals -WEBPORTAL_ORDER_LIST_ACCESS = Enable access to the orders -WEBPORTAL_INVOICE_LIST_ACCESS = Enable access to the invoices -WEBPORTAL_USER_LOGGED = Select a user -WebPortalUserLoggedHelp = This user is used to update cards - -# -# Public pages -# -WebPortalHomeTitle = Welcome -WebPortalHomeDesc = Welcome to the public interface -WebPortalPropalListMenu = Proposals -WebPortalPropalListTitle = List of proposals -WebPortalPropalListDesc = List of proposals -WebPortalPropalListNothing = Proposals not found -WebPortalOrderListMenu = Orders -WebPortalOrderListTitle = List of orders -WebPortalOrderListDesc = List of orders -WebPortalOrderListNothing = Orders not found -WebPortalInvoiceListMenu = Invoices -WebPortalInvoiceListTitle = List of invoices -WebPortalInvoiceListDesc = List of invoices -WebPortalInvoiceListNothing = Invoices not found -WebPortalMemberCardMenu = Member -WebPortalMemberCardTitle = Member card -WebPortalMemberCardDesc = Member card -WebPortalPartnershipCardMenu = Partnership -WebPortalPartnershipCardTitle = Partnership card -WebPortalPartnershipCardDesc = Partnership card -loginWebportalUserName = User name / email -loginWebportalPassword = Password -LoginNow = Login now -RemoveSearchFilters = Remove search filters - - -# -# Aria accessibility -# -AriaPrevPage = Previous page -AriaNextPage = Next page -AriaPageX = Page %s - -# -# Errors -# -WebPortalError404 = Page not found -WebPortalErrorPageNotExist = Page not exist -WebPortalErrorFetchThirdPartyAccountFromLogin = Error when loading third-party account (login : %s) -WebPortalErrorAuthentication = Authentication error -WebPortalErrorFetchLoggedThirdPartyAccount = Error when loading third-party account (login : %s) -WebPortalErrorFetchLoggedUser = Error when loading user (Id : %s) -WebPortalErrorFetchLoggedThirdParty = Error when loading third-party (Id : %s) -WebPortalErrorFetchLoggedMember = Error when loading member (Id : %s) -WebPortalErrorFetchLoggedPartnership = Error when loading partnership (Third-party Id : %s, Member Id : %s) - -# -# Color theme settings -# - -WEBPORTAL_PRIMARY_COLOR = Primary color -WEBPORTAL_SECONDARY_COLOR = Secondary color -WEBPORTAL_LOGIN_LOGO_URL = Login logo image URL -WEBPORTAL_MENU_LOGO_URL = Menu logo image URL -WEBPORTAL_MENU_LOGO_URLTooltip = Leave empty to use login logo -WEBPORTAL_LOGIN_BACKGROUND = Background login image URL -WEBPORTAL_BANNER_BACKGROUND = Background for banner -WEBPORTAL_BANNER_BACKGROUND_IS_DARK = Use dark theme for banner diff --git a/htdocs/webportal/lib/webportal.lib.php b/htdocs/webportal/lib/webportal.lib.php index 3e4f3f1012c..16d3ecc9876 100644 --- a/htdocs/webportal/lib/webportal.lib.php +++ b/htdocs/webportal/lib/webportal.lib.php @@ -35,7 +35,7 @@ function webportalAdminPrepareHead() // $extrafields = new ExtraFields($db); // $extrafields->fetch_name_optionals_label('myobject'); - $langs->load("webportal@webportal"); + $langs->load("website"); $h = 0; $head = array(); @@ -74,9 +74,9 @@ function webportalAdminPrepareHead() //$this->tabs = array( // 'entity:-tabname:Title:@webportal:/webportal/mypage.php?id=__ID__' //); // to remove a tab - complete_head_from_modules($conf, $langs, null, $head, $h, 'webportal@webportal'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'website'); - complete_head_from_modules($conf, $langs, null, $head, $h, 'webportal@webportal', 'remove'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'website', 'remove'); return $head; }