From 2c6e7f2917b8fbc582a6b99e461f65e2f12dfddf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Feb 2020 13:40:19 +0100 Subject: [PATCH] Tooltip for example on IP restrictions --- htdocs/admin/dav.php | 10 ++++++++-- htdocs/api/admin/index.php | 4 +++- htdocs/langs/en_US/admin.lang | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index eb62c224e5c..bb7e82901f5 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -87,7 +87,10 @@ if ($action == 'edit') print ''; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); $label = $langs->trans($key); - if ($key == 'DAV_RESTICT_ON_IP') $label = $langs->trans("RESTRICT_ON_IP"); + if ($key == 'DAV_RESTICT_ON_IP') { + $label = $langs->trans("RESTRICT_ON_IP"); + $label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); + } print $form->textwithpicto($label, $tooltiphelp); print ''; if ($key == 'DAV_ALLOW_PRIVATE_DIR') @@ -124,7 +127,10 @@ else print ''; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); $label = $langs->trans($key); - if ($key == 'DAV_RESTICT_ON_IP') $label = $langs->trans("RESTRICT_ON_IP"); + if ($key == 'DAV_RESTICT_ON_IP') { + $label = $langs->trans("RESTRICT_ON_IP"); + $label .= ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); + } print $form->textwithpicto($label, $tooltiphelp); print ''; if ($key == 'DAV_ALLOW_PRIVATE_DIR') diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 45cf082763e..73041f6c386 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -130,7 +130,9 @@ print ' '; print ''; print ''; -print ''.$langs->trans("RESTRICT_API_ON_IP").''; +print ''.$langs->trans("RESTRICT_ON_IP"); +print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample"); +print ''; print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4ba8ac211c9..96be43b305c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1971,8 +1971,8 @@ DeleteEmailCollector=Delete email collector ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector? RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined -RESTRICT_API_ON_IP=Allow available APIs to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can use the available APIs. RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access. +IPListExample=127.0.0.1 192.168.0.2 [::1] BaseOnSabeDavVersion=Based on the library SabreDAV version NotAPublicIp=Not a public IP MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.