source: main/trunk/greenstone3/web/interfaces/default/transform/pages/login.xsl

Last change on this file was 37628, checked in by davidb, 13 months ago

Code tidyup

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- this page is used when the user clicks the Login button. If they have been directed to Login by trying to access a restricted page when they are not already logged in, then they will go to the Login section of authen.xsl -->
3<xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:java="http://xml.apache.org/xslt/java"
6 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
7 xmlns:gslib="http://www.greenstone.org/skinning"
8 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
9 extension-element-prefixes="java util"
10 exclude-result-prefixes="java util">
11
12 <!-- use the 'main' layout -->
13 <xsl:import href="layouts/main.xsl"/>
14
15 <!-- set page title -->
16 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></xsl:template>
17
18 <!-- set page breadcrumbs -->
19 <xsl:template name="breadcrumbs"><gslib:siteLink/></xsl:template>
20
21 <!-- the page content -->
22 <xsl:template match="/page">
23 <gsf:style>
24 <xsl:text disable-output-escaping="yes">
25 /* Based on: https://stackoverflow.com/questions/2812770/add-centered-text-to-the-middle-of-a-horizontal-rule */
26.hr-with-text {
27 display: flex;
28 align-items: center;
29 text-align: center;
30}
31
32.hr-with-text::before,
33.hr-with-text::after {
34 content: '';
35 flex: 1;
36 border-bottom: 1px solid #000;
37}
38
39.hr-with-text:not(:empty)::before {
40 margin-right: .25em;
41}
42
43.hr-with-text:not(:empty)::after {
44 margin-left: .25em;
45}
46
47
48input.gsloginform[type=submit] {
49 float: right;
50 margin-right: 3px;
51 margin-top: 5px;
52 width: 80px;
53 height: 30px;
54}
55
56 </xsl:text>
57 </gsf:style>
58
59 <gsf:variable name="loginErrorMessage"><xsl:value-of select="/page/pageRequest/paramList/param[@name = 'loginMessage']/@value"/></gsf:variable>
60
61 <!--
62 <xsl:if test="/page/pageRequest/paramList/param[@name = 'loginMessage']/@value">
63 -->
64 <xsl:if test="$loginErrorMessage != ''">
65 <div id="gs_error" class="ui-state-error ui-corner-all">
66 <span class="ui-icon ui-icon-alert" style="float: left;">
67 <xsl:text> </xsl:text>
68 </span>
69 <xsl:value-of select="$loginErrorMessage"/>
70 </div>
71 <br/>
72 </xsl:if>
73 <xsl:call-template name="loginForm">
74 <xsl:with-param name="action-url" select="/page/pageRequest/paramList/param[@name = 'redirectURL']/@value" />
75 </xsl:call-template>
76 </xsl:template>
77</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.