Rev 1714 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1686 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.Globals" %> |
2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
3 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
10 | <script> |
||
11 | var actionAuthenticate = "<%=request.getContextPath()%>/authenticateWidget.do"; |
||
12 | function authenticateWidget() |
||
13 | { |
||
14 | var username = $("#formAuthenticationWidget input[name='username']").val(); |
||
15 | var password = $("#formAuthenticationWidget input[name='password']").val(); |
||
16 | widgetSimpleCallWithActionParameters( |
||
17 | "<%=request.getContextPath()%>/authenticateWidget.do", |
||
18 | "loginWidget", |
||
19 | { |
||
20 | "username" : username, |
||
21 | "password" : password |
||
22 | }, |
||
23 | "#formAuthenticationWidget", |
||
24 | function() |
||
25 | { |
||
26 | $('#modalAuthentication').modal('hide'); |
||
27 | }, |
||
28 | function() |
||
29 | { |
||
30 | //fail |
||
31 | } |
||
32 | ); |
||
33 | } |
||
34 | </script> |
||
35 | |||
36 | |||
37 | |||
38 | <!--AUTENTICATION MODAL--> |
||
39 | <script> |
||
40 | $(document).ready(function(){ |
||
41 | $('#modalAuthentication').on('show.bs.modal', function(e) |
||
42 | { |
||
43 | $("#modalAuthentication .web-messages").html(""); |
||
44 | }); |
||
45 | }); |
||
46 | </script> |
||
47 | <div class="modal fade" id="modalAuthentication" role="dialog" > |
||
48 | <div class="modal-dialog" data-width="960" style="display: block; width: 960px; margin-top: 50px;" aria-hidden="false"> |
||
49 | |||
50 | <!-- Modal content--> |
||
51 | <div class="modal-content"> |
||
52 | <div class="modal-header"> |
||
53 | <h1 class="modal-title">Formulário de Autenticação</h1> |
||
54 | </div> |
||
55 | |||
56 | <div class="modal-body"> |
||
57 | <div class="alert alert-info"> |
||
58 | Caro utilizador, a sessão expirou, por favor introduza as suas credênciais |
||
59 | para voltar a autênticar-se no sistema |
||
60 | e poder repetir a última operação. Obrigado. |
||
61 | </div> |
||
62 | |||
63 | <div id="formAuthenticationWidget" class="clearfix"> |
||
64 | |||
65 | <div class="web-messages" style="margin-bottom: 5px"></div> |
||
66 | |||
67 | <div class="form-horizontal col-md-12 clearfix"> |
||
68 | <div class="form-group clearfix"> |
||
69 | <label class="col-md-12" style="margin-bottom: 10px"><jomm:messageConfigKey config="authentication.policy.username.msg.key"/></label> |
||
70 | <div class="col-md-6"> |
||
71 | <input type="text" class="form-control" name="username"/> |
||
72 | </div> |
||
73 | </div> |
||
74 | <div class="form-group clearfix"> |
||
75 | <label class="col-md-12" style="margin-bottom: 10px"><jomm:messageConfigKey config="authentication.policy.password.msg.key"/></label> |
||
76 | <div class="col-md-6"> |
||
77 | <input type="password" class="form-control" name="password"/> |
||
78 | </div> |
||
79 | </div> |
||
80 | <div class="col-sm-2"> |
||
81 | <button type="button" class="btn btn-success" onclick="authenticateWidget()"><bean:message key="submit"/></button> |
||
82 | </div> |
||
83 | </div> |
||
84 | </div> |
||
85 | |||
86 | |||
87 | </div> |
||
88 | </div> |
||
89 | |||
90 | </div> |
||
91 | </div> |
||
92 |