summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-03 08:54:14 -0400
committerjim-p <jimp@pfsense.org>2011-06-03 09:03:13 -0400
commit19cdeb3eda777f37ce89acc81f84346b8b6309d1 (patch)
tree885fcd8e686143c8ddeed3ab29319051d1857a21 /usr/local/www/vpn_openvpn_client.php
parent1591ea6fc80937e41e7345bfa139d2ae56d96cb4 (diff)
downloadpfsense-19cdeb3eda777f37ce89acc81f84346b8b6309d1.zip
pfsense-19cdeb3eda777f37ce89acc81f84346b8b6309d1.tar.gz
Instead of showing an emtpy drop-down for CA/Cert/CRL, show an error that there are none defined, and link to the page to create one.
Diffstat (limited to 'usr/local/www/vpn_openvpn_client.php')
-rw-r--r--usr/local/www/vpn_openvpn_client.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index 709b668..97b7769 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -628,6 +628,7 @@ if ($savemsg)
<tr id="tls_ca">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Peer Certificate Authority"); ?></td>
<td width="78%" class="vtable">
+ <?php if (count($a_ca)): ?>
<select name='caref' class="formselect">
<?php
foreach ($a_ca as $ca):
@@ -638,11 +639,15 @@ if ($savemsg)
<option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['descr'];?></option>
<?php endforeach; ?>
</select>
+ <?php else: ?>
+ <b>No Certificate Authorities defined.</b> <br/>Create one under <a href="system_camanager.php">System &gt; Cert Manager</a>.
+ <?php endif; ?>
</td>
</tr>
<tr id="tls_cert">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Client Certificate"); ?></td>
<td width="78%" class="vtable">
+ <?php if (count($a_cert)): ?>
<select name='certref' class="formselect">
<?php
foreach ($a_cert as $cert):
@@ -663,6 +668,9 @@ if ($savemsg)
<option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'] . $caname . $inuse . $revoked;?></option>
<?php endforeach; ?>
</select>
+ <?php else: ?>
+ <b>No Certificates defined.</b> <br/>Create one under <a href="system_certmanager.php">System &gt; Cert Manager</a>.
+ <?php endif; ?>
</td>
</tr>
<tr id="psk">
OpenPOWER on IntegriCloud