diff options
author | Evgeny Yurchenko <ey@tm-k.com> | 2011-06-17 00:57:49 -0400 |
---|---|---|
committer | Evgeny Yurchenko <ey@tm-k.com> | 2011-06-17 00:57:49 -0400 |
commit | 24cbe7a895c78ce12cde907ab4994630391567e0 (patch) | |
tree | 99aa700c70a3a79a18d31485772fcd2eebccb222 | |
parent | 21cc2faa85e612169d98deca1f72fce9ff9260a5 (diff) | |
download | pfsense-24cbe7a895c78ce12cde907ab4994630391567e0.zip pfsense-24cbe7a895c78ce12cde907ab4994630391567e0.tar.gz |
Bug #1437. Dropdown list for country codes for CSRs (Cert Manager)
-rw-r--r-- | usr/local/www/system_certmanager.php | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php index 439969d..87b8d91 100644 --- a/usr/local/www/system_certmanager.php +++ b/usr/local/www/system_certmanager.php @@ -425,6 +425,15 @@ function internalca_change() { print_input_errors($input_errors); if ($savemsg) print_info_box($savemsg); + + // Load valid country codes + $dn_cc = array(); + if (file_exists("/etc/ca_countries")){ + $dn_cc_file=file("/etc/ca_countries"); + foreach($dn_cc_file as $line) + if (preg_match('/^(\S*)\s(.*)$/', $line, $matches)) + array_push($dn_cc, $matches[1]); + } ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> @@ -651,13 +660,15 @@ function internalca_change() { <tr> <td align="right"><?=gettext("Country Code");?> : </td> <td align="left"> - <input name="csr_dn_country" type="text" class="formfld unknown" size="2" value="<?=htmlspecialchars($pconfig['csr_dn_country']);?>" /> - - <em>ex:</em> - - US - - <em><?=gettext("( two letters )");?></em> + <select name='csr_dn_country' class="formselect"> + <?php + foreach( $dn_cc as $cc){ + $selected = ""; + if ($pconfig['csr_dn_country'] == $cc) $selected = "selected"; + print "<option value=\"$cc\" $selected>$cc</option>"; + } + ?> + </select> </td> </tr> <tr> |