summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_authservers.php
diff options
context:
space:
mode:
authorRenato Botelho <renato.botelho@bluepex.com>2010-04-28 13:51:22 -0300
committerRenato Botelho <renato.botelho@bluepex.com>2010-04-28 13:51:22 -0300
commit257705ca3aa6ba0a98a1d97f8460d496a8ba2c10 (patch)
tree2df0fdb832fcaa05f5be5a8f94c9ace4c53d9256 /usr/local/www/system_authservers.php
parent683c26cfeba1c694a16074ae8307cf86dab49cd0 (diff)
downloadpfsense-257705ca3aa6ba0a98a1d97f8460d496a8ba2c10.zip
pfsense-257705ca3aa6ba0a98a1d97f8460d496a8ba2c10.tar.gz
Implement gettext()
Diffstat (limited to 'usr/local/www/system_authservers.php')
-rw-r--r--usr/local/www/system_authservers.php76
1 files changed, 44 insertions, 32 deletions
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index ca47289..8fa7896 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -41,7 +41,7 @@
require("guiconfig.inc");
require_once("auth.inc");
-$pgtitle = array("System", "Authentication Servers");
+$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -141,40 +141,52 @@ if ($_POST) {
$reqdfields = explode(" ", "name type ldap_host ldap_port ".
"ldap_urltype ldap_protver ldap_scope ldap_basedn ".
"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers");
- $reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
- "Port value,Transport,Protocol version,Search level,".
- "Search Base DN,User naming Attribute,".
- "Group naming Attribute,Group member attribute,Authentication container");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Type"),
+ gettext("Hostname or IP"),
+ gettext("Port value"),
+ gettext("Transport"),
+ gettext("Protocol version"),
+ gettext("Search level"),
+ gettext("Search Base DN"),
+ gettext("User naming Attribute"),
+ gettext("Group naming Attribute"),
+ gettext("Group member attribute"),
+ gettext("Authentication container"));
if (!$pconfig['ldap_anon']) {
$reqdfields[] = "ldap_binddn";
$reqdfields[] = "ldap_bindpw";
- $reqdfieldsn[] = "Bind user DN";
- $reqdfieldsn[] = "Bind Password";
+ $reqdfieldsn[] = gettext("Bind user DN");
+ $reqdfieldsn[] = gettext("Bind Password");
}
}
if ($pconfig['type'] == "radius") {
$reqdfields = explode(" ", "name type radius_host radius_srvcs");
- $reqdfieldsn = explode(",", "Descriptive name,Type,Hostname or IP,".
- "Services");
+ $reqdfieldsn = array(
+ gettext("Descriptive name"),
+ gettext("Type"),
+ gettext("Hostname or IP"),
+ gettext("Services"));
if ($pconfig['radisu_srvcs'] == "both" ||
$pconfig['radisu_srvcs'] == "auth") {
$reqdfields[] = "radius_auth_port";
- $reqdfieldsn[] = "Authentication port value";
+ $reqdfieldsn[] = gettext("Authentication port value");
}
if ($pconfig['radisu_srvcs'] == "both" ||
$pconfig['radisu_srvcs'] == "acct") {
$reqdfields[] = "radius_acct_port";
- $reqdfieldsn[] = "Accounting port value";
+ $reqdfieldsn[] = gettext("Accounting port value");
}
if (!isset($id)) {
$reqdfields[] = "radius_secret";
- $reqdfieldsn[] = "Shared Secret";
+ $reqdfieldsn[] = gettext("Shared Secret");
}
}
@@ -184,7 +196,7 @@ if ($_POST) {
$input_errors[] = gettext("The host name contains invalid characters.");
if (auth_get_authserver($pconfig['name']) && !isset($id))
- $input_errors[] = "A authentication server with the same name already exists.";
+ $input_errors[] = gettext("An authentication server with the same name already exists.");
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
@@ -350,13 +362,13 @@ function select_clicked() {
document.getElementById("ldap_scope").value == '' ||
document.getElementById("ldap_basedn").value == '' ||
document.getElementById("ldapauthcontainers").value == '') {
- alert("Please fill the required values.");
+ alert("<?=gettext("Please fill the required values.");?>");
return;
}
if (!document.getElementById("ldap_anon").checked) {
if (document.getElementById("ldap_binddn").value == '' ||
document.getElementById("ldap_bindpw").value == '') {
- alert("Please fill the bind username/password.");
+ alert("<?=gettext("Please fill the bind username/password.");?>");
return;
}
}
@@ -373,7 +385,7 @@ function select_clicked() {
var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
if (oWin==null || typeof(oWin)=="undefined")
- alert('Popup blocker detected. Action aborted.');
+ alert("<?=gettext('Popup blocker detected. Action aborted.');?>");
}
//-->
</script>
@@ -442,7 +454,7 @@ function select_clicked() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">LDAP Server Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("LDAP Server Settings");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
@@ -523,10 +535,10 @@ function select_clicked() {
<td>Containers: &nbsp;</td>
<td>
<input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
- <input type="button" onClick="select_clicked();" value="Select">
- <br />NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.
- <br />EXAMPLE: CN=Users;DC=example
- <br />EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com
+ <input type="button" onClick="select_clicked();" value="<?=gettext("Select");?>">
+ <br /><?=gettext("NOTE: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.");?>
+ <br /><?=gettext("EXAMPLE: CN=Users;DC=example");?>
+ <br /><?=gettext("EXAMPLE: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com ");?>
</td>
</tr>
</table>
@@ -542,7 +554,7 @@ function select_clicked() {
<input name="ldap_anon" type="checkbox" id="ldap_anon" value="yes" <?php if ($pconfig['ldap_anon']) echo "checked"; ?> onClick="ldap_bindchange()">
</td>
<td>
- Use anonymous binds to resolve distinguished names
+ <?=gettext("Use anonymous binds to resolve distinguished names");?>
</td>
</tr>
</table>
@@ -551,13 +563,13 @@ function select_clicked() {
<td colspan="2"></td>
</tr>
<tr>
- <td>User DN: &nbsp;</td>
+ <td><?=gettext("User DN");?>: &nbsp;</td>
<td>
<input name="ldap_binddn" type="text" class="formfld unknown" id="ldap_binddn" size="40" value="<?=htmlspecialchars($pconfig['ldap_binddn']);?>"/><br/>
</td>
</tr>
<tr>
- <td>Password: &nbsp;</td>
+ <td><?=gettext("Password");?>: &nbsp;</td>
<td>
<input name="ldap_bindpw" type="password" class="formfld pwd" id="ldap_bindpw" size="20" value="<?=htmlspecialchars($pconfig['ldap_bindpw']);?>"/><br/>
</td>
@@ -607,7 +619,7 @@ function select_clicked() {
<td colspan="2" class="list" height="12"></td>
</tr>
<tr>
- <td colspan="2" valign="top" class="listtopic">Radius Server Settings</td>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Radius Server Settings");?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP address");?></td>
@@ -654,7 +666,7 @@ function select_clicked() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input id="submit" name="save" type="submit" class="formbtn" value="Save" />
+ <input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<?php if (isset($id) && $a_server[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>" />
<?php endif;?>
@@ -667,9 +679,9 @@ function select_clicked() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="25%" class="listhdrr">Server Name</td>
- <td width="25%" class="listhdrr">Type</td>
- <td width="35%" class="listhdrr">Host Name</td>
+ <td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Type");?></td>
+ <td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
<td width="10%" class="list"></td>
</tr>
<?php
@@ -686,11 +698,11 @@ function select_clicked() {
<td valign="middle" nowrap class="list">
<?php if ($i < (count($a_server) - 1)): ?>
<a href="system_authservers.php?act=edit&id=<?=$i;?>">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="edit server" alt="edit server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
</a>
&nbsp;
<a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="delete server" alt="delete server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
</a>
<?php endif; ?>
</td>
@@ -702,7 +714,7 @@ function select_clicked() {
<td class="list" colspan="3"></td>
<td class="list">
<a href="system_authservers.php?act=new">
- <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="add server" alt="add server" width="17" height="17" border="0" />
+ <img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
</a>
</td>
</tr>
OpenPOWER on IntegriCloud