Changeset 2077
- Timestamp:
- Oct 31, 2011, 3:46:31 PM (11 years ago)
- Location:
- trunk/grails-app/views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/common/_login_panel.gsp
r1886 r2077 1 1 <!-- LOGIN PANEL --> 2 2 <div id="toppanel" class="toppanel"> 3 3 <div id="panel"> 4 4 <div class="content clearfix"> 5 5 <div class="left"> 6 6 <h1>Welcome to the ${grailsApplication.config.application.title}</h1> 7 7 8 <h2>Version <b>${meta(name: 'app.version')}, build #<g:meta name="app.build.svn.revision"/></b></h2> 9 8 10 <p class="grey">Please use the forms on the right to either log in if you already have an account, or sign up if you think this data support platform suits your needs.</p> 9 11 <g:if test="${flash.message}"><p class="red">${flash.message}</p></g:if> 10 12 </div> 13 11 14 <div class="left"> 12 15 <g:form controller="." action="j_spring_security_check" method='POST' class="clearfix"> 13 16 <h1>Member Login</h1> 14 17 <label class="grey" for="username">Username:</label> 15 <input class="field" type="text" name="j_username" id="j_username" value="${username}" size="23" 18 <input class="field" type="text" name="j_username" id="j_username" value="${username}" size="23"/> 16 19 <label class="grey" for="password">Password:</label> 17 <input class="field" type="password" name="j_password" id="password" size="23" 20 <input class="field" type="password" name="j_password" id="password" size="23"/> 18 21 <label><input type='checkbox' class='chk' name='_spring_security_remember_me' id='remember_me' 19 <g:if test='${hasCookie}'>checked='checked'</g:if> /> Remember me</label> 20 <div class="clear"></div> 21 <input type="submit" name="submit" value="Login" class="bt_login" /> 22 <g:if test='${hasCookie}'>checked='checked'</g:if>/> Remember me</label> 23 24 <div class="clear"></div> 25 <input type="submit" name="submit" value="Login" class="bt_login"/> 22 26 23 27 <g:if test="${redirectUrl}"> 24 <g:hiddenField name="spring-security-redirect" value="${redirectUrl}"/>28 <g:hiddenField name="spring-security-redirect" value="${redirectUrl}"/> 25 29 </g:if> 26 30 27 <a class="lost-pwd" href="<g:createLink url="[action:'forgotPassword',controller:'register']" class="lost-pwd" />">Lost your password?</a> 31 <a class="lost-pwd" href="<g:createLink url="[action:'forgotPassword',controller:'register']" 32 class="lost-pwd"/>">Lost your password?</a> 28 33 </g:form> 29 34 </div> 35 30 36 <div class="left right"> 31 <g:form url="[action:'add',controller:'userRegistration']" class="clearfix registration"> 32 <input type="hidden" name="targetUri" value="${targetUri}" /> 37 <g:form url="[action:'add',controller:'userRegistration']" class="clearfix registration"> 38 <input type="hidden" name="targetUri" value="${targetUri}"/> 39 33 40 <h1>Not a member yet? Sign Up!</h1> 34 <g:hasErrors bean="${command}"> 35 <g:renderErrors bean="${command}" as="list" /> 36 <g:if test="${addSendUserLink}"> 37 <a class="resend_confirmation" href="<g:createLink url="[action:'sendUserConfirmation',controller:'userRegistration', params: [username: username]]" />">Resend confirmation message</a><br /> 38 </g:if> 39 </g:hasErrors> 41 <g:hasErrors bean="${command}"> 42 <g:renderErrors bean="${command}" as="list"/> 43 <g:if test="${addSendUserLink}"> 44 <a class="resend_confirmation" href="<g:createLink 45 url="[action:'sendUserConfirmation',controller:'userRegistration', params: [username: username]]"/>">Resend confirmation message</a><br/> 46 </g:if> 47 </g:hasErrors> 40 48 41 49 <label class="grey" for="signup">Username:</label> 42 <input class="field" type="text" name="username" id="username" value="${username}" size="23" 50 <input class="field" type="text" name="username" id="username" value="${username}" size="23"/> 43 51 <label class="grey" for="email">Email:</label> 44 <input class="field" type="text" name="email" id="email" value="${email}" size="23" 45 52 <input class="field" type="text" name="email" id="email" value="${email}" size="23"/> 53 <label>A password will be e-mailed to you</label> 46 54 47 <input type="submit" name="submit" value="Register" class="bt_register" 48 55 <input type="submit" name="submit" value="Register" class="bt_register"/> 56 </g:form> 49 57 </div> 50 58 </div> 51 59 </div> 60 52 61 <div class="tab"> 53 62 <ul class="login"> 54 63 <li class="left"> </li> 55 64 <li>Hello <sec:ifLoggedIn><sec:username/></sec:ifLoggedIn> 56 65 <sec:ifNotLoggedIn>Guest</sec:ifNotLoggedIn>!</li> 57 66 <sec:ifLoggedIn> 58 <li class="sep">|</li>59 <li id="toggle">60 61 </li>67 <li class="sep">|</li> 68 <li id="toggle"> 69 <g:link controller="userRegistration" action="profile">profile</g:link> 70 </li> 62 71 </sec:ifLoggedIn> 63 72 <li class="sep">|</li> 64 73 <li id="toggle"> 65 <sec:ifLoggedIn><g:link controller="logout" action="index">sign out</g:link></sec:ifLoggedIn> 66 <sec:ifNotLoggedIn> 67 <a id="open" class="open" href="#">Log In | Register</a> 68 <a id="close" style="display: none;" class="close" href="#">Close Panel</a> 69 </sec:ifNotLoggedIn> 74 <sec:ifLoggedIn><g:link controller="logout" action="index">sign out</g:link></sec:ifLoggedIn> 75 <sec:ifNotLoggedIn> 76 <g:if test="${request.getHeaderNames().find{ it == 'UseShibboleth' }}"> 77 <g:link class="open" controller="login">Log in</g:link> 78 </g:if> 79 <g:else> 80 <a id="open" class="open" href="#">Log In | Register</a> 81 <a id="close" style="display: none;" class="close" href="#">Close Panel</a> 82 </g:else> 83 </sec:ifNotLoggedIn> 70 84 </li> 71 85 <li class="right"> </li> 72 86 </ul> 73 87 </div> 74 88 </div> 75 89 <!-- /LOGIN PANEL --> -
trunk/grails-app/views/login/auth.gsp
r1430 r2077 1 1 <head> 2 <meta name='layout' content='main' /> 3 <title>Login</title> 4 <style type='text/css' media='screen'> 5 #login { 6 margin:15px 0px; padding:0px; 7 text-align:center; 8 } 9 #login .inner { 10 width:260px; 11 margin:0px auto; 12 text-align:left; 13 padding:10px; 14 border-top:1px dashed #499ede; 15 border-bottom:1px dashed #499ede; 16 background-color:#EEF; 17 } 18 #login .inner .fheader { 19 padding:4px;margin:3px 0px 3px 0;color:#2e3741;font-size:14px;font-weight:bold; 20 } 21 #login .inner .cssform p { 22 clear: left; 23 margin: 0; 24 padding: 5px 0 8px 0; 25 padding-left: 105px; 26 border-top: 1px dashed gray; 27 margin-bottom: 10px; 28 height: 1%; 29 } 30 #login .inner .cssform input[type='text'] { 31 width: 120px; 32 } 33 #login .inner .cssform label { 34 font-weight: bold; 35 float: left; 36 margin-left: -105px; 37 width: 100px; 38 } 39 #login .inner .login_message {color:red;} 40 #login .inner .text_ {width:120px;} 41 #login .inner .chk {height:12px;} 42 </style> 2 <meta name='layout' content='main'/> 3 <title>Login</title> 4 <style type='text/css' media='screen'> 5 #login { 6 margin: 15px 0px; 7 padding: 0px; 8 text-align: center; 9 } 10 11 #login .inner { 12 width: 260px; 13 margin: 0px auto; 14 text-align: left; 15 padding: 10px; 16 border-top: 1px dashed #499ede; 17 border-bottom: 1px dashed #499ede; 18 background-color: #EEF; 19 } 20 21 #login .inner .fheader { 22 padding: 4px; 23 margin: 3px 0px 3px 0; 24 color: #2e3741; 25 font-size: 14px; 26 font-weight: bold; 27 } 28 29 #login .inner .cssform p { 30 clear: left; 31 margin: 0; 32 padding: 5px 0 8px 0; 33 padding-left: 105px; 34 border-top: 1px dashed gray; 35 margin-bottom: 10px; 36 height: 1%; 37 } 38 39 #login .inner .cssform input[type='text'] { 40 width: 120px; 41 } 42 43 #login .inner .cssform label { 44 font-weight: bold; 45 float: left; 46 margin-left: -105px; 47 width: 100px; 48 } 49 50 #login .inner .login_message { 51 color: red; 52 } 53 54 #login .inner .text_ { 55 width: 120px; 56 } 57 58 #login .inner .chk { 59 height: 12px; 60 } 61 </style> 43 62 </head> 44 63 45 64 <body> 46 47 65 <div id='login'> 66 <div class='inner' style="margin-top: 160px;"> 48 67 49 50 68 <!-- Logging in is handled in the login panel --> 69 <!-- That's why the login form is removed here, and the data is moved down --> 51 70 52 53 54 55 71 <g:if test='${flash.message}'> 72 <div class='login_message'>${flash.message}</div> 73 </g:if> 74 <div class='fheader'>Please Login..</div> 56 75 57 </div>58 76 </div> 77 </div> 78 <g:if test="${!request.getHeaderNames().find{ it == 'UseShibboleth' }}"> 59 79 <script type='text/javascript'> 60 <!--61 (function(){62 // Open login panel63 $("div#panel").slideDown("slow");64 $("#toggle a").toggle();80 <!-- 81 (function() { 82 // Open login panel 83 $("div#panel").slideDown("slow"); 84 $("#toggle a").toggle(); 65 85 66 })();67 // -->86 })(); 87 // --> 68 88 </script> 89 </g:if> 69 90 </body> 91 </html>
Note: See TracChangeset
for help on using the changeset viewer.