source: branches/3.16-stable/www/exception/not_logged_in.jsp @ 7795

Last change on this file since 7795 was 7795, checked in by Nicklas Nordborg, 2 years ago

Fixes #2204: Fix mis-alignment of the "Login again" button

This dialog now uses 2 different groups of buttons. One group with "Close" and "Login again" and one group with only a "Login again" button. Only one of the groups is displayed for a given page so the buttons should always be center-aligned now.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1<%-- $Id: not_logged_in.jsp 7795 2020-04-08 12:37:57Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2005 Nicklas Nordborg
4  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg
5  Copyright (C) 2007 Nicklas Nordborg
6
7  This file is part of BASE - BioArray Software Environment.
8  Available at http://base.thep.lu.se/
9
10  BASE is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 3
13  of the License, or (at your option) any later version.
14
15  BASE is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19
20  You should have received a copy of the GNU General Public License
21  along with BASE. If not, see <http://www.gnu.org/licenses/>.
22  ------------------------------------------------------------------
23
24  This page is used to catch NotLoggedInExceptions which are
25  directed here via the exception.jsp page. NotLoggedInExceptions
26  happen when a user tries to access a protected page without beeing
27  logged in. Typically the exception is thrown from the method that
28  retrieves the BaseControl object:
29
30  BASE.getExistingBaseControl(pageContext);
31
32  This page will display a new login form allowing the user
33  to login again and continue with what he/she was doing.
34
35  @author Nicklas
36  @version 2.0
37--%>
38<%@ page pageEncoding="UTF-8" session="false"
39  import="net.sf.basedb.core.Application"
40  import="net.sf.basedb.core.SessionControl"
41  import="net.sf.basedb.clients.web.Base"
42  import="net.sf.basedb.util.Values"
43  isErrorPage="true"
44%>
45<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
46<%
47final SessionControl sc = Base.getSessionControl(pageContext, true);
48final String ID = sc.getId();
49final String root = request.getContextPath()+"/";
50final String redirect = Values.getString((String)request.getAttribute("redirect"));
51
52try
53{
54  %>
55  <base:page type="default" menu="exception" title="Not logged in">
56  <base:head scripts="exception.js">
57  <style>
58  .default h1
59  {
60    position: inherit;
61    height: auto;
62    width: auto;
63  }
64  .popup h1
65  {
66    margin-left: 0.5em;
67  }
68  .dialogbuttons.popup-only
69  {
70    display: none;
71  }
72  .popup .dialogbuttons.popup-only
73  {
74    display: block;
75  }
76  .popup .dialogbuttons.no-popup
77  {
78    display: none;
79  }
80  </style>
81  </base:head>
82  <base:body data-resize-if-popup="1">
83 
84    <table style="margin: auto; max-width: 600px; margin-top:5em; margin-bottom: 1em;">
85    <tr>
86    <td>
87      <h1>Not logged in</h1>
88      <div class="messagecontainer error" style="margin-top: 0.25em; padding: 1em; font-size: 120%;">
89        You have been automatically logged out due to inactivity or because the
90        server has been restarted.
91        You may log in again and continue your work but unsaved changes
92        may have been lost.
93      </div>
94    </td>
95    </tr>
96    </table>
97
98    <base:buttongroup subclass="dialogbuttons popup-only">
99      <base:button id="close" title="Close"/>
100      <base:button id="gologin" image="login.png" title="Login again&hellip;" />
101    </base:buttongroup>
102    <base:buttongroup subclass="dialogbuttons no-popup">
103      <base:button id="gologin2" image="login.png" title="Login again&hellip;" />
104    </base:buttongroup>
105       
106  </base:body>
107  </base:page>
108  <%
109}
110finally
111{}
112%>
Note: See TracBrowser for help on using the repository browser.