Project

General

Profile

OpenAMIdPInstallDebianLenny » Login.jsp

Lutz Suhrbier, 03/24/2010 06:56 PM

 
1
<%--
2
   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
  
4
   Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
5
  
6
   The contents of this file are subject to the terms
7
   of the Common Development and Distribution License
8
   (the License). You may not use this file except in
9
   compliance with the License.
10
                                                                                
11
   You can obtain a copy of the License at
12
   https://opensso.dev.java.net/public/CDDLv1.0.html or
13
   opensso/legal/CDDLv1.0.txt
14
   See the License for the specific language governing
15
   permission and limitations under the License.
16
                                                                                
17
   When distributing Covered Code, include this CDDL
18
   Header Notice in each file and include the License file
19
   at opensso/legal/CDDLv1.0.txt.
20
   If applicable, add the following below the CDDL Header,
21
   with the fields enclosed by brackets [] replaced by
22
   your own identifying information:
23
   "Portions Copyrighted [year] [name of copyright owner]"
24
                                                                                
25
   $Id: Login.jsp,v 1.11 2009/01/09 07:13:21 bhavnab Exp $
26
                                                                                
27
--%>
28

    
29

    
30

    
31

    
32
<html>
33

    
34
<%@page info="Login" language="java"%>
35
<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
36
<%@taglib uri="/WEB-INF/auth.tld" prefix="auth"%>
37
<jato:useViewBean className="com.sun.identity.authentication.UI.LoginViewBean">
38

    
39

    
40
<%@ page contentType="text/html" %>
41

    
42
<head>
43
<title><jato:text name="htmlTitle_Login" /></title>
44

    
45
<%
46
String ServiceURI = (String) viewBean.getDisplayFieldValue(viewBean.SERVICE_URI);
47
String encoded = "false";
48
String gotoURL = (String) viewBean.getValidatedInputURL(
49
    request.getParameter("goto"), request.getParameter("encoded"), request);
50
String encodedQueryParams = (String) viewBean.getEncodedQueryParams(request);
51
if ((gotoURL != null) && (gotoURL.length() != 0)) {
52
    encoded = "true";
53
}
54
%>
55

    
56
<link rel="stylesheet" href="<%= ServiceURI %>/css/styles.css" type="text/css" />
57
<script language="JavaScript" src="<%= ServiceURI %>/js/browserVersion.js"></script>
58
<script language="JavaScript" src="<%= ServiceURI %>/js/auth.js"></script>
59

    
60
<script language="JavaScript">
61

    
62
    writeCSS('<%= ServiceURI %>');
63

    
64
<jato:content name="validContent">
65
    var defaultBtn = 'Submit';
66
    var elmCount = 0;
67

    
68
    /** submit form with default command button */
69
    function defaultSubmit() {
70
        LoginSubmit(defaultBtn);
71
    }
72

    
73
    /**
74
     * submit form with given button value
75
     *
76
     * @param value of button
77
     */
78
    function LoginSubmit(value) {
79
        aggSubmit();
80
        var hiddenFrm = document.forms['Login'];
81

    
82
        if (hiddenFrm != null) {
83
	    hiddenFrm.elements['IDButton'].value = value;
84
            if (this.submitted) {
85
                alert("The request is currently being processed");
86
            }
87
            else {
88
                this.submitted = true;
89
                hiddenFrm.submit();
90
            }
91
        }
92
    }
93

    
94
</jato:content>
95
</script>
96
<script type="text/javascript"><!--// Empty script so IE5.0 Windows will draw table and button borders
97
//-->
98
</script>
99
  
100
</head>
101

    
102
<body class="LogBdy" onload="placeCursorOnFirstElm();">
103

    
104
  <table border="0" cellpadding="0" cellspacing="0" align="center" title="">
105
    <tr>
106
      <td class="LogMidBnd" style="background-image: url(<%= ServiceURI %>/images/gradlogsides.jpg);
107
        background-repeat:repeat-x;background-position:left top;">&nbsp;</td>
108
      <td class="LogCntTd" style="background-image: url(<%= ServiceURI %>/images/login-backimage.jpg);
109
        background-repeat:no-repeat;background-position:left top;" height="425" align="center" valign="middle">
110
        <table border="0" background="<%= ServiceURI %>/images/dot.gif" cellpadding="0" cellspacing="0" 
111
        width="100%" title="">
112
          <tr>
113
            <td width="260"><img src="<%= ServiceURI %>/images/dot.gif" width="260" height="242" alt="" /></td>
114
            <td width="395" bgcolor="#ffffff" valign="top"><img src="<%= ServiceURI %>/images/dot.gif" width="30" height="1" alt="" /><img name="Login.productLogo" 
115
            src="<%= ServiceURI %>/images/PrimaryProductName.png" alt="<auth:resBundle bundleName="amAuthUI" resourceKey="basic_realm" />" 
116
            border="0" />
117
              <table border="0" cellspacing="0" cellpadding="0">
118
                <tr>
119
                  <td colspan="2">
120
                      <img src="<%= ServiceURI %>/images/dot.gif" width="1" height="25" alt="" />                                
121
                  </td>
122
                </tr>
123

    
124
        <!-- display authentication scheme -->
125

    
126
        <!-- Header display -->
127
        <tr>
128
        <td nowrap="nowrap"></td>
129
        <td><div class="logTxtSvrNam">                    
130
        <jato:content name="ContentStaticTextHeader">
131
            <jato:getDisplayFieldValue name='StaticTextHeader'
132
                defaultValue='Authentication' fireDisplayEvents='true'
133
                escape='false'/>
134
        </jato:content>        
135
        </div></td>
136
        </tr>
137
        <!-- End of Header display -->      
138
  
139
        <jato:content name="validContent">
140

    
141
        <jato:tiledView name="tiledCallbacks"
142
            type="com.sun.identity.authentication.UI.CallBackTiledView">
143

    
144
        <script language="javascript">
145
            elmCount++;
146
        </script>
147

    
148
        <jato:content name="textBox">
149
        <!-- text box display -->
150
        <tr>
151
        <form name="frm<jato:text name="txtIndex" />" action="blank"
152
            onSubmit="defaultSubmit(); return false;" method="post">
153

    
154
        <td nowrap="nowrap"><div class="logLbl">
155
            <jato:content name="isRequired">
156
            <img src="<%= ServiceURI %>/images/required.gif" alt="Required Field" 
157
            title="Required Field" width="7" height="14" />
158
            </jato:content>
159
            <span class="LblLev2Txt">
160
            <label for="IDToken<jato:text name="txtIndex" />">                
161
                <jato:text name="txtPrompt" defaultValue="User name:" 
162
                                                        escape="false" />                           
163
            </label></span></div>
164
        </td>
165
        
166
        <td><div class="logInp">
167
            <input type="text" name="IDToken<jato:text name="txtIndex" />"
168
                id="IDToken<jato:text name="txtIndex" />"
169
                value="<jato:text name="txtValue" />" class="TxtFld"></div>
170
        </td>
171
        </form>
172
        </tr>        
173
        <!-- end of textBox -->
174
        </jato:content>
175

    
176
        <jato:content name="password">
177
        <!-- password display -->
178
        <tr>
179
        <form name="frm<jato:text name="txtIndex" />" action="blank"
180
            onSubmit="defaultSubmit(); return false;" method="post">
181

    
182
        <td nowrap="nowrap"><div class="logLbl">
183
            <jato:content name="isRequired">
184
            <img src="<%= ServiceURI %>/images/required.gif" alt="Required Field" 
185
            title="Required Field" width="7" height="14" />
186
            </jato:content>
187
            <span class="LblLev2Txt">
188
            <label for="IDToken<jato:text name="txtIndex" />">  
189
                <jato:text name="txtPrompt" defaultValue="Password:" 
190
                                                        escape="false" />                
191
            </label></span></div>
192
        </td>
193

    
194
        <td><div class="logInp">
195
            <input type="password" name="IDToken<jato:text name="txtIndex" />"
196
                id="IDToken<jato:text name="txtIndex" />"
197
                value="" class="TxtFld"></div>
198
        </td>
199
        </form>
200
        </tr>        
201
        <!-- end of password -->
202
        </jato:content>
203

    
204
        <jato:content name="choice">
205
        <!-- choice value display -->
206
        <tr>
207
        <form name="frm<jato:text name="txtIndex" />" action="blank"
208
            onSubmit="defaultSubmit(); return false;" method="post">
209

    
210
        <td nowrap="nowrap"><div class="logLbl">
211
            <jato:content name="isRequired">
212
            <img src="<%= ServiceURI %>/images/required.gif" alt="Required Field" 
213
            title="Required Field" width="7" height="14" />
214
            </jato:content>
215
            <span class="LblLev2Txt">
216
            <label for="IDToken<jato:text name="txtIndex" />">  
217
                <jato:text name="txtPrompt" defaultValue="RadioButton:" 
218
                                                            escape="false" />                
219
            </label></span></div>
220
        </td>
221

    
222
        <td><div class="logInp">
223
            <jato:tiledView name="tiledChoices"
224
                type="com.sun.identity.authentication.UI.CallBackChoiceTiledView">
225

    
226
            <jato:content name="selectedChoice">
227
                <input type="radio"
228
                    name="IDToken<jato:text name="txtParentIndex" />"
229
                    id="IDToken<jato:text name="txtParentIndex" />"
230
                    value="<jato:text name="txtIndex" />" class="Rb"
231
                    checked><jato:text name="txtChoice" /><br>
232
            </jato:content>
233

    
234
            <jato:content name="unselectedChoice">
235
                <input type="radio"
236
                    name="IDToken<jato:text name="txtParentIndex" />"
237
                    id="IDToken<jato:text name="txtParentIndex" />"
238
                    value="<jato:text name="txtIndex" />" class="Rb"
239
                    ><jato:text name="txtChoice" /><br>
240
            </jato:content>
241

    
242
            </jato:tiledView></div>
243
        </td>
244
        </form>
245
        </tr>
246
        <tr></tr>
247
        <!-- end of choice -->
248
        </jato:content>
249

    
250
        <!-- end of tiledCallbacks -->
251
        </jato:tiledView>
252

    
253
        <!-- end of validContent -->
254
        </jato:content>
255

    
256

    
257
        <jato:content name="ContentStaticTextResult">
258
        <!-- after login output message -->
259
        <p><b><jato:getDisplayFieldValue name='StaticTextResult'
260
            defaultValue='' fireDisplayEvents='true' escape='false'/></b></p>
261
        </jato:content>
262

    
263
        <jato:content name="ContentHref">
264
        <!-- URL back to Login page -->
265
            <p><auth:href name="LoginURL"
266
                    fireDisplayEvents='true'>
267
                <jato:text
268
                name="txtGotoLoginAfterFail" /></auth:href></p>
269
        </jato:content>
270

    
271
        <jato:content name="ContentImage">
272
        <!-- customized image defined in properties file -->
273
            <p><img name="IDImage"
274
                src="<jato:getDisplayFieldValue name='Image'/>" alt=""></p>
275
        </jato:content>
276

    
277
        <jato:content name="ContentButtonLogin">
278
        <!-- Submit button -->
279

    
280
        <jato:content name="hasButton">
281
        <script language="javascript">
282
            defaultBtn = '<jato:text name="defaultBtn" />';
283
        </script>
284
        <tr>
285
        <td><img src="<%= ServiceURI %>/images/dot.gif" 
286
        width="1" height="15" alt="" /></td>
287
        <td>
288
            <table border=0 cellpadding=0 cellspacing=0>
289
            <tr>
290
            <jato:tiledView name="tiledButtons"
291
                type="com.sun.identity.authentication.UI.ButtonTiledView">            
292
                <script language="javascript">
293
                    markupButton(
294
                        '<jato:text name="txtButton" />',
295
                        "javascript:LoginSubmit('<jato:text name="txtButton" />')");
296
                </script>            
297
            </jato:tiledView>        
298
            </tr>
299
            </table>
300
        </td>
301
        </tr>
302
        <!-- end of hasButton -->
303
        </jato:content>
304

    
305
        <jato:content name="hasNoButton">
306
        <tr>
307
        <td><img src="<%= ServiceURI %>/images/dot.gif" 
308
        width="1" height="15" alt="" /></td>
309
            <script language="javascript">
310
                markupButton(
311
                    '<jato:text name="lblSubmit" />',
312
                           "javascript:LoginSubmit('<jato:text name="lblSubmit" />')");
313
            </script>
314
        </tr>
315
        <!-- end of hasNoButton -->
316
        </jato:content>
317

    
318
        <!-- end of ContentButtonLogin -->
319
        </jato:content>
320
        <tr>
321
            <td>&nbsp;</td>
322
        </tr>
323
        <tr>
324
            <td><img src="<%= ServiceURI %>/images/dot.gif" 
325
            width="1" height="33" alt="" /></td>
326
            <td>&nbsp;</td>
327
        </tr>
328
        </table>
329
      </td>
330
      <td width="45"><img src="<%= ServiceURI %>/images/dot.gif" 
331
      width="45" height="245" alt="" /></td>
332
    </tr>
333
    </table>
334
    </td>
335
  </table>
336

    
337
<jato:content name="validContent">
338
<auth:form name="Login" method="post"
339
    defaultCommandChild="DefaultLoginURL" >
340

    
341
<script language="javascript">
342
    if (elmCount != null) {
343
        for (var i = 0; i < elmCount; i++) {
344
            document.write(
345
                "<input name=\"IDToken" + i + "\" type=\"hidden\">");
346
        }
347
        document.write("<input name=\"IDButton"  + "\" type=\"hidden\">");
348
    }
349
</script>
350
<input type="hidden" name="goto" value="<%= gotoURL %>">
351
<input type="hidden" name="SunQueryParamsString" value="<%= encodedQueryParams %>">
352
<input type="hidden" name="encoded" value="<%= encoded %>">
353
</auth:form>
354
</jato:content>
355

    
356
</body>
357

    
358
</jato:useViewBean>
359

    
360
</html>
(7-7/18)