packages/ssoinabox-webui/root/usr/local/share/weblogin/ssoinabox/templates/login.tmpl
changeset 0 3906ca745819
child 3 a044870a9d3d
equal deleted inserted replaced
-1:000000000000 0:3906ca745819
       
     1 <!DOCTYPE html>
       
     2 <!-- :mode=html: -->
       
     3 <html>
       
     4   <head>
       
     5     <meta http-equiv="pragma" content="no-cache" />
       
     6     <title>SSO-in-a-Box Login</title>
       
     7     <link rel="stylesheet" type="text/css" href="images/bootstrap/css/bootstrap.min.css" />
       
     8     <link rel="stylesheet" type="text/css" href="images/ssoinabox.css" />
       
     9   </head>
       
    10 
       
    11   [% IF notdefined %]
       
    12 <!--
       
    13 This is the template for the WebAuth login page.  This page is called from
       
    14 login.fcgi script on the weblogin server.  It displays a form asking the
       
    15 user for username and password.  Variables used:
       
    16 
       
    17 error                  : some error occurred
       
    18 err_missinginput       : one of username or password missing
       
    19 err_username           : no username error
       
    20 err_password           : no password error
       
    21 err_loginfailed        : username and password were incorrect
       
    22 err_forced             : web site requires username/password login
       
    23 err_rejected           : username not permitted to authenticate
       
    24 RT                     : Response Token
       
    25 ST                     : Service Token
       
    26 username               : the username
       
    27 login_cancel           : a cancel URL was specified
       
    28 cancel_url             : the specified cancel URL
       
    29 show_remuser           : show a button for REMOTE_USER authentication
       
    30 remuser_failed         : REMOTE_USER authentication was tried and failed
       
    31 remuser_url            : where to send the user for REMOTE_USER auth
       
    32 -->
       
    33   [% END %]
       
    34 
       
    35   <body onload="document.forms.login.username.focus();">
       
    36   	<div class="well login-form">
       
    37   	<h1>
       
    38   		<img alt="SSO in a Box" src="images/ssoinabox.png" />
       
    39 	</h1>
       
    40   	
       
    41     [% IF error %]
       
    42       <div class="alert alert-error">
       
    43           [% IF err_missinginput %]
       
    44             <!-- This is just the combination of err_username and
       
    45                  err_password if you want only one error message.  We
       
    46                  don't use it. -->
       
    47           [% END %]
       
    48           [% IF err_username && err_password %]
       
    49             <!-- Error: no username or password submitted. -->
       
    50             Error: Enter your username and password.
       
    51           [% ELSIF err_username %]
       
    52             <!-- Error: no username submitted. -->
       
    53             Error: Enter your username.
       
    54           [% ELSIF err_password %]
       
    55             <!-- Error: no password submitted. -->
       
    56             Error: Enter your password.
       
    57           [% END %]
       
    58 
       
    59           [% IF err_loginfailed %]
       
    60             <!-- Error: login failed. -->
       
    61             Error: You entered an incorrect username or password (or both).
       
    62           [% END %]
       
    63 
       
    64           [% IF err_rejected %]
       
    65             <!-- Error: user principal rejected. -->
       
    66             Error: That username may not authenticate to this service.
       
    67           [% END %]
       
    68 
       
    69           [% IF err_forced %]
       
    70             <!-- Not really an error, forced login. -->
       
    71             This web site requires that you log in with username and password.
       
    72           [% END %]
       
    73       </div>
       
    74     [% END %]
       
    75 
       
    76     [% IF remuser_failed %]
       
    77       <div class="error" align="center">
       
    78         <p><strong>Error: Apache authentication was tried and
       
    79         failed.</strong></p>
       
    80       </div>
       
    81     [% END %]
       
    82 
       
    83     <div class="loginbox">
       
    84 		<form name="login" action="[% script_name FILTER html %]" method="post" autocomplete="OFF" enctype="application/x-www-form-urlencoded">
       
    85 			<input type="hidden" name="rm" value="index" />
       
    86 			<input type="hidden" name="RT" value="[% RT FILTER html %]" />
       
    87 			<input type="hidden" name="ST" value="[% ST FILTER html %]" />
       
    88 			<input type="hidden" name="login" value="yes" />
       
    89 			
       
    90 			<i class="icon icon-user"></i> <input name="username" type="text" value="[% username FILTER html %]" placeholder="Username" /><br />
       
    91 			<i class="icon icon-lock"></i> <input name="password" type="password" placeholder="Password" /><br />
       
    92 			
       
    93 			<input type="submit" name="Submit" value="Login" class="btn btn-primary" />
       
    94 			[% IF login_cancel %]
       
    95 				<!-- The WebAuth Server has a cancel url.-->
       
    96 				<a href="[% cancel_url FILTER html %]" class="btn">Cancel</a>
       
    97 			[% END %]
       
    98 			
       
    99 			<br />
       
   100 			<p class="links">
       
   101 				<a href="/lostpw">Forgot password?</a> &bull;
       
   102 				<a href="/security.html">Account security</a> &bull;
       
   103 				<a href="/help.html">Help</a>
       
   104 			</p>
       
   105 		</form>
       
   106 	</div>
       
   107 
       
   108     [% IF show_remuser %]
       
   109       <div class="remuserbox" align="center">
       
   110         <table border="1" width="70%">
       
   111           <tr>
       
   112               <td>
       
   113                 Or skip entering your username and password.  Instead,
       
   114                 log in using your computer login information via
       
   115                 Apache authentication:
       
   116               </td>
       
   117               <td>
       
   118                 <form action="[% remuser_url FILTER html %]"
       
   119                       method="get">
       
   120                   <input type="hidden" name="rm" value="index">
       
   121                   <input type="hidden" name="RT"
       
   122                          value="[% RT FILTER html %]">
       
   123                   <input type="hidden" name="ST"
       
   124                          value="[% ST FILTER html %]">
       
   125                   <input type="submit" name="Submit" value="remuser">
       
   126                 </form>
       
   127               </td>
       
   128             </tr>
       
   129         </table>
       
   130       </div>
       
   131     [% END %]
       
   132     
       
   133 	</div> <!-- div.well.login-form -->
       
   134   </body>
       
   135 </html>