Project

General

Profile

« Previous | Next » 

Revision 6767

redirect to the registry form following successful login - but allow an override in case we only want to render the success and stay there (ajax call from main sanparks page).

View differences:

lib/style/skins/sanparks/sanparksLogin.xsl
36 36
 <xsl:param name="servletURL"/>
37 37
 <xsl:param name="cgi-prefix"/>
38 38
 <xsl:param name="qformat">sanparks</xsl:param>
39
 <xsl:param name="redirect">true</xsl:param>
39 40
 <xsl:template match="/">
40 41
  	<xsl:choose>
41 42
  	<xsl:when test="count(login) &gt; 0">
42
		<h3>Welcome, <xsl:value-of select="login/name"/>  </h3>
43
		<form name="logoutForm" onsubmit="submitLogoutFormIntoDiv('{$servletURL}', this, 'loginSection')">
44
			<input name="qformat" value="sanparks" type="hidden" />
45
			<input name="action" type="hidden" value="logout"/>
46
			<table>
47
				<tr valign="top">
48
					<td><p class="regtext">You are currently logged in.</p></td>
49
					<td align="right">
50
						<input name="action" type="submit" value="Logout" class="button_login" />
51
					</td>
52
			</tr>
53
			<tr valign="top">
54
				<td colspan="2"><p class="regtext">(<xsl:value-of select="login/message"/>)</p></td>
55
			</tr>	
56
			<tr>	
57
				<td colspan="2" class="regtext" align="center" valign="top">				
58
					<!-- reset pass --> 
59
					<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=resetpass" target="_parent">
60
						reset your password
61
					</a>
62
					|
63
					<!-- change pass --> 
64
					<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=changepass" target="_parent">
65
						change your password
66
					</a>
67
				</td>
68
			</tr>
69
		</table>
70
		</form>
71
		
72
		<!-- File Upload Form --> 
73
		<br/>		
74
		<h3>Data Package Upload</h3>
75
		
76
		<table width="100%">
77
		<tr valign="top">
78
			<td align="right">
79
				<form method="post" action="{$contextURL}/style/skins/sanparks/upload.jsp">
80
					<input type="submit" value="Go >" class="button_login" />
43
  		<xsl:choose>
44
  			<xsl:when test="$redirect = 'true'">
45
  				<script language="JavaScript">
46
					<![CDATA[
47
			            function redirect() {
48
			                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA[/register-dataset.cgi?cfg=sanparks";
49
			            }
50
			            redirect();]]>
51
		         </script>
52
  			</xsl:when>
53
  			<xsl:otherwise>
54
  			
55
				<h3>Welcome, <xsl:value-of select="login/name"/>  </h3>
56
				<form name="logoutForm" onsubmit="submitLogoutFormIntoDiv('{$servletURL}', this, 'loginSection')">
57
					<input name="qformat" value="sanparks" type="hidden" />
58
					<input name="action" type="hidden" value="logout"/>
59
					<table>
60
						<tr valign="top">
61
							<td><p class="regtext">You are currently logged in.</p></td>
62
							<td align="right">
63
								<input name="action" type="submit" value="Logout" class="button_login" />
64
							</td>
65
						</tr>
66
						<tr valign="top">
67
							<td colspan="2"><p class="regtext">(<xsl:value-of select="login/message"/>)</p></td>
68
						</tr>	
69
						<tr>	
70
							<td colspan="2" class="regtext" align="center" valign="top">				
71
								<!-- reset pass --> 
72
								<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=resetpass" target="_parent">
73
									reset your password
74
								</a>
75
								|
76
								<!-- change pass --> 
77
								<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=changepass" target="_parent">
78
									change your password
79
								</a>
80
							</td>
81
						</tr>
82
					</table>
81 83
				</form>
82
			</td>
83
		</tr>
84
	</table>
84
				
85
				<!-- File Upload Form --> 
86
				<br/>		
87
				<h3>Data Package Upload</h3>
88
				
89
				<table width="100%">
90
					<tr valign="top">
91
						<td align="right">
92
							<form method="post" action="{$contextURL}/style/skins/sanparks/upload.jsp">
93
								<input type="submit" value="Go >" class="button_login" />
94
							</form>
95
						</td>
96
					</tr>
97
				</table>
98
			</xsl:otherwise>
99
		</xsl:choose>		
85 100
	</xsl:when>
86 101
  	<xsl:otherwise>
87 102
		<h3>Login
lib/style/skins/sanparks/SaeonLogin.jspx
238 238
	<form name="loginForm" method="post" action="./"
239 239
		onsubmit="return allowSubmit(this)">
240 240
		<input name="qformat" type="hidden" value="sanparks" />
241
		<input name="redirect" type="hidden" value="false" />
241 242
	<table>
242 243
		<tr valign="top">
243 244
			<td>

Also available in: Unified diff