Преглед изворни кода

Tooltip for example on IP restrictions

Laurent Destailleur пре 5 година
родитељ
комит
2c6e7f2917
3 измењених фајлова са 12 додато и 4 уклоњено
  1. 8 2
      htdocs/admin/dav.php
  2. 3 1
      htdocs/api/admin/index.php
  3. 1 1
      htdocs/langs/en_US/admin.lang

+ 8 - 2
htdocs/admin/dav.php

@@ -87,7 +87,10 @@ if ($action == 'edit')
 		print '<tr class="oddeven"><td>';
 		$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 '</td><td>';
 		if ($key == 'DAV_ALLOW_PRIVATE_DIR')
@@ -124,7 +127,10 @@ else
 		print '<tr class="oddeven"><td>';
 		$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 '</td><td>';
 		if ($key == 'DAV_ALLOW_PRIVATE_DIR')

+ 3 - 1
htdocs/api/admin/index.php

@@ -130,7 +130,9 @@ print '<td>&nbsp;</td>';
 print '</tr>';
 
 print '<tr class="oddeven">';
-print '<td>'.$langs->trans("RESTRICT_API_ON_IP").'</td>';
+print '<td>'.$langs->trans("RESTRICT_ON_IP");
+print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");
+print '</td>';
 print '<td><input type="text" name="API_RESTRICT_ON_IP" value="'.dol_escape_htmltag($conf->global->API_RESTRICT_ON_IP).'"></td>';
 print '<td>';
 print '<input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></td>';

+ 1 - 1
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.