summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_notifications.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-09-04 09:54:32 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-09-04 09:55:05 -0400
commitac9b1e944284dafad9a03b80448420d9320bf666 (patch)
tree4333e0038357323500ecbda4bae711ae696f68da /src/usr/local/www/system_advanced_notifications.php
parent8e41eb2660c5edc77e1bcdc756affad2dd63282b (diff)
downloadpfsense-ac9b1e944284dafad9a03b80448420d9320bf666.zip
pfsense-ac9b1e944284dafad9a03b80448420d9320bf666.tar.gz
Test for #5087
Attempt to prevent browser autofil on email username
Diffstat (limited to 'src/usr/local/www/system_advanced_notifications.php')
-rw-r--r--src/usr/local/www/system_advanced_notifications.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php
index 88f14a3..8ebf2ef 100644
--- a/src/usr/local/www/system_advanced_notifications.php
+++ b/src/usr/local/www/system_advanced_notifications.php
@@ -177,8 +177,8 @@ if ($_POST) {
write_config();
-// pfSenseHeader("system_advanced_notifications.php");
-// return;
+ pfSenseHeader("system_advanced_notifications.php");
+ return;
}
@@ -333,8 +333,9 @@ $section->addInput(new Form_Input(
))->setHelp('Enter the e-mail address that you would like email '.
'notifications sent to.');
+// This name prevents the browser from auto-filling the field. We change it on submit
$section->addInput(new Form_Input(
- 'smtpusername',
+ 'emanresuptms',
'Notification E-Mail auth username (optional)',
'text',
$pconfig['smtpusername']
@@ -369,5 +370,20 @@ $section->addInput(new Form_Checkbox(
$form->add($section);
print($form);
-
+?>
+<script>
+//<![CDATA[
+events.push(function(){
+ // Change the name and ID of the 'emanresuptms' field back to 'smtpusername' in an attempt
+ // to prevent the browser from autofilling the field
+ $('form').submit(function(){
+ var elem = $('#emanresuptms');
+ elem.attr('name', 'smtpusername');
+ elem.attr('id', 'smtpusername');
+
+ });
+});
+//]]>
+</script>
+<?php
include("foot.inc"); \ No newline at end of file
OpenPOWER on IntegriCloud