diff options
author | Evgeny Yurchenko <ey@tm-k.com> | 2011-06-14 14:47:59 -0400 |
---|---|---|
committer | Evgeny Yurchenko <ey@tm-k.com> | 2011-06-16 23:04:49 -0400 |
commit | 9d2d65f3a3e0478b75a42086167c6520d31778c7 (patch) | |
tree | 0f5c085737f9ab2b2e10ef5c543f06c72b49d726 /usr/local/www/system_camanager.php | |
parent | 2de8d7457116753709fdb8030b6a9623d328cc52 (diff) | |
download | pfsense-9d2d65f3a3e0478b75a42086167c6520d31778c7.zip pfsense-9d2d65f3a3e0478b75a42086167c6520d31778c7.tar.gz |
Bug #1437. Dropdown list for country codes (CA manager)
Diffstat (limited to 'usr/local/www/system_camanager.php')
-rw-r--r-- | usr/local/www/system_camanager.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/usr/local/www/system_camanager.php b/usr/local/www/system_camanager.php index 5541f83..052e2e4 100644 --- a/usr/local/www/system_camanager.php +++ b/usr/local/www/system_camanager.php @@ -271,6 +271,15 @@ function method_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> @@ -394,12 +403,15 @@ function method_change() { <tr> <td align="right"><?=gettext("Country Code");?> : </td> <td align="left"> - <input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>"/> - - <em><?=gettext("ex:");?></em> - - <?=gettext("US");?> - <em><?=gettext("( two letters )");?></em> + <select name='dn_country' class="formselect"> + <?php + foreach( $dn_cc as $cc){ + $selected = ""; + if ($pconfig['dn_country'] == $cc) $selected = "selected"; + print "<option value=\"$cc\" $selected>$cc</option>"; + } + ?> + </select> </td> </tr> <tr> |