aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-10-01 13:40:10 +0200
committerdoktornotor <notordoktor@gmail.com>2015-10-01 13:40:10 +0200
commit0101b159ad8ebad4f335f33dfef91c6f1b2c90f6 (patch)
tree2f2debd68bc947494b012059d6256f88c12699fd /config/squid3
parent61c51f185fce33bef11164cb7224f4d64708b9ee (diff)
downloadpfsense-packages-0101b159ad8ebad4f335f33dfef91c6f1b2c90f6.tar.gz
pfsense-packages-0101b159ad8ebad4f335f33dfef91c6f1b2c90f6.tar.bz2
pfsense-packages-0101b159ad8ebad4f335f33dfef91c6f1b2c90f6.zip
Antivirus GUI behaviour sanitization - first part
Use JS to toggle access to different parts of the GUI, depending on whether the users want to configure things by editing config files or via the GUI options.
Diffstat (limited to 'config/squid3')
-rwxr-xr-xconfig/squid3/34/squid.inc42
1 files changed, 42 insertions, 0 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index db5f1b0c..e286b37d 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -2413,6 +2413,48 @@ function squid_print_javascript_auth2() {
print("<script type=\"text/javascript\">on_auth_method_changed()</script>\n");
}
+function squid_print_antivirus_advanced_config() {
+ $javascript = <<< EOD
+<script type="text/javascript">
+//<![CDATA[
+function on_antivirus_advanced_config_changed() {
+ var field = document.iform.enable_advanced;
+ var enable_advanced = field.options[field.selectedIndex].value;
+
+ if (enable_advanced === 'disabled') {
+ document.iform['client_info'].disabled = 0;
+ document.iform['clamav_safebrowsing'].disabled = 0;
+ document.iform['clamav_update'].disabled = 0;
+ document.iform['clamav_dbregion'].disabled = 0;
+ document.iform['clamav_dbservers'].disabled = 0;
+ document.iform['squidclamav'].disabled = 1;
+ document.iform['c-icap_conf'].disabled = 1;
+ document.iform['c-icap_magic'].disabled = 1;
+ document.iform['freshclam_conf'].disabled = 1;
+ } else {
+ document.iform['client_info'].disabled = 1;
+ document.iform['clamav_safebrowsing'].disabled = 1;
+ document.iform['clamav_update'].disabled = 1;
+ document.iform['clamav_dbregion'].disabled = 1;
+ document.iform['clamav_dbservers'].disabled = 1;
+ document.iform['squidclamav'].disabled = 0;
+ document.iform['c-icap_conf'].disabled = 0;
+ document.iform['c-icap_magic'].disabled = 0;
+ document.iform['freshclam_conf'].disabled = 0;
+ }
+}
+//]]>
+</script>
+
+EOD;
+ print($javascript);
+
+}
+
+function squid_print_antivirus_advanced_config2() {
+ print('<script type="text/javascript">on_antivirus_advanced_config_changed()</script>\n');
+}
+
function squid_generate_rules($type) {
global $config, $pfs_version;