RT# 80624 Edge browser bug warning at login
[freeside.git] / httemplate / loginout / login.html
1 <& /elements/header-minimal.html, 'Login' &>
2 <link href="<%$url_string%>elements/freeside.css" type="text/css" rel="stylesheet">
3
4 <CENTER>
5
6   <BR>
7   <FONT SIZE=5>Login</FONT>
8   <BR><BR>
9
10 % if ( $error ) { 
11   <FONT SIZE="+1" COLOR="#ff0000"><% $error |h %></FONT>
12   <BR><BR>
13 % } 
14              
15 %#  <FORM METHOD="POST" ACTION="<%$url_string%>loginout/login">
16 %  my $uri = $r->prev->uri;
17 %  $uri .= '?'. $r->prev->args if length( $r->prev->args );
18   <FORM METHOD="POST" ACTION="/login">
19     <INPUT TYPE="hidden" NAME="destination" VALUE="<% $uri %>">
20
21     <TABLE CELLSPACING=0 CELLPADDING=4 CLASS="fsinnerbox">
22       <TR>
23         <TD ALIGN="right">Username: </TD>
24         <TD><INPUT TYPE="text" NAME="credential_0" SIZE="13"></TD>
25       </TR>
26       <TR>
27         <TD ALIGN="right">Password: </TD>
28         <TD><INPUT TYPE="password" NAME="credential_1" SIZE="13"></TD>
29       </TR>
30     </TABLE>
31     <BR>
32  
33     <INPUT TYPE="submit" VALUE="Login">
34
35   </FORM>
36
37   <div id="edgebug" style="display: none; border: solid 1px #888; border-radius: 4px; margin: 5em; max-width: 400px; text-align: left; padding: 0 1em;">
38     <div style="text-align: center; font-size: 3em; color: #933; text-shadow: 1px 1px 2px black;">
39       &#9888;
40     </div>
41     <h4 style="border-bottom: solid 1px #888; margin: 1em 0; text-align: center;">
42       Edge Browser Bug
43     </h4>
44     <p>
45       Please ensure your version of Windows is up to date.
46     </p>
47     <p>
48       You are using the Microsoft Edge browser.  In July, Microsoft fixed a
49       bug in Edge.  The bug causes Edge to rarely send different data to
50       the server than the user selected.
51     </p>
52     <p>
53       Only Windows 10 computers that have not received Microsoft's
54       <b>July RS4 Windows 10 Update</b>
55       <sup>
56         [<a  style="text-decoration: none;" href="https://support.microsoft.com/en-us/help/4338819/windows-10-update-kb4338819">*</a>]
57       </sup> are affected.
58     </p>
59   </div>
60
61 </CENTER>
62
63 <script type="text/javascript">
64   if ( /Edge\/17\.17134/.test( navigator.userAgent ) ) {
65     document.getElementById('edgebug').style.display = 'block';
66   }
67 </script>
68
69 </BODY></HTML>
70 <%init>
71
72 my %error = (
73   'no_cookie'       => '', #First login, don't display an error
74   'bad_cookie'      => 'Bad Cookie', #timed out?
75   'bad_credentials' => 'Incorrect username / password',
76   #'logout'          => 'You have been logged out.',
77 );
78
79 my $error = # $cgi->param('logout') ||
80             $r->prev->subprocess_env('AuthCookieReason');
81
82 $error = exists($error{$error}) ? $error{$error} : $error;
83
84
85 my $url_string = $r->uri;
86
87 #fake a freeside path for /login so we get our .css.  shrug
88 $url_string =~ s/login$/freeside\/login/ unless $url_string =~ /freeside\//;
89
90 #even though this is kludgy and false laziness w/CGI.pm
91 $url_string =~ s{ / index\.html /? $ }
92                 {/}x;
93 $url_string =~
94   s{
95      /(login|loginout)
96      ([\w\-\.\/]*)
97      $
98    }
99    {}ix;
100
101 $url_string .= '/' unless $url_string =~ /\/$/;
102
103 </%init>