[LON-CAPA-cvs] cvs: loncom /interface lonpreferences.pm
raeburn
raeburn at source.lon-capa.org
Mon Sep 12 11:51:09 EDT 2016
raeburn Mon Sep 12 15:51:09 2016 EDT
Modified files:
/loncom/interface lonpreferences.pm
Log:
- Disable autocapitalization for input fields for username and e-mail
address for password reset form, if user agent suggests a mobile device.
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.220 loncom/interface/lonpreferences.pm:1.221
--- loncom/interface/lonpreferences.pm:1.220 Sat Feb 20 00:12:39 2016
+++ loncom/interface/lonpreferences.pm Mon Sep 12 15:51:08 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.220 2016/02/20 00:12:39 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.221 2016/09/12 15:51:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1425,16 +1425,28 @@
'changepass' => 'Save',
);
+ my $mobileargs;
+ (undef,undef,undef,undef,undef,undef,my $clientmobile) =
+ &Apache::loncommon::decode_user_agent();
+ if ($clientmobile) {
+ $mobileargs = 'autocapitalize="off" autocorrect="off" ';
+ }
my $output = '<form name="client" action="">'
.&Apache::lonhtmlcommon::start_pick_box();
if ($caller eq 'reset_by_email') {
+ my $mobileargs;
+ (undef,undef,undef,undef,undef,undef,my $clientmobile) =
+ &Apache::loncommon::decode_user_agent();
+ if ($clientmobile) {
+ $mobileargs = 'autocapitalize="off" autocorrect="off" ';
+ }
$output .= &Apache::lonhtmlcommon::row_title(
'<label for="email">'.$lt{'email'}.'</label>')
- .'<input type="text" name="email" size="30" />'
+ .'<input type="text" name="email" size="30" '.$mobileargs.'/>'
.&Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title(
'<label for="uname">'.$lt{'username'}.'</label>')
- .'<input type="text" name="uname" size="20" />'
+ .'<input type="text" name="uname" size="20" '.$mobileargs.'/>'
.'<input type="hidden" name="currentpass" value="'.$currentpass.'" />'
.&Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title(
More information about the LON-CAPA-cvs
mailing list