From 170a85502283dc2f8a3d189519c35a2b33700012 Mon Sep 17 00:00:00 2001 From: jim-p Date: Sat, 6 Oct 2012 17:36:09 -0400 Subject: Allow editing an imported CRL, and refresh OpenVPN CRLs when saving. Implements #2652 --- usr/local/www/system_crlmanager.php | 49 ++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/usr/local/www/system_crlmanager.php b/usr/local/www/system_crlmanager.php index da63f7f..5f90723 100644 --- a/usr/local/www/system_crlmanager.php +++ b/usr/local/www/system_crlmanager.php @@ -182,12 +182,11 @@ if ($act == "delcert") { } if ($_POST) { - unset($input_errors); $pconfig = $_POST; /* input validation */ - if ($pconfig['method'] == "existing") { + if (($pconfig['method'] == "existing") || ($act == "editimported")) { $reqdfields = explode(" ", "descr crltext"); $reqdfieldsn = array( gettext("Descriptive name"), @@ -221,10 +220,12 @@ if ($_POST) { } $crl['descr'] = $pconfig['descr']; - $crl['caref'] = $pconfig['caref']; - $crl['method'] = $pconfig['method']; + if ($act != "editimported") { + $crl['caref'] = $pconfig['caref']; + $crl['method'] = $pconfig['method']; + } - if ($pconfig['method'] == "existing") { + if (($pconfig['method'] == "existing") || ($act == "editimported")) { $crl['text'] = base64_encode($pconfig['crltext']); } @@ -238,7 +239,7 @@ if ($_POST) { $a_crl[] = $crl; write_config("Saved CRL {$crl['descr']}"); - + openvpn_refresh_crls(); pfSenseHeader("system_crlmanager.php"); } } @@ -392,6 +393,38 @@ function method_change() { + + +
+ + + + + + + + + + + + + + + + + +
+ +
+ +
+
  + " /> + + +
+
+
@@ -556,6 +589,10 @@ function method_change() { " alt="" width="17" height="17" border="0" /> + + + " alt="" width="17" height="17" border="0" /> + ')"> -- cgit v1.1