| ## Licensed to the Apache Software Foundation (ASF) under one |
| ## or more contributor license agreements. See the NOTICE file |
| ## distributed with this work for additional information |
| ## regarding copyright ownership. The ASF licenses this file |
| ## to you under the Apache License, Version 2.0 (the |
| ## "License"); you may not use this file except in compliance |
| ## with the License. You may obtain a copy of the License at |
| ## |
| ## http://www.apache.org/licenses/LICENSE-2.0 |
| ## |
| ## Unless required by applicable law or agreed to in writing, |
| ## software distributed under the License is distributed on an |
| ## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ## KIND, either express or implied. See the License for the |
| ## specific language governing permissions and limitations |
| ## under the License. |
| |
| ## |
| ## If you want to use intake to process the data, uncomment below |
| ## |
| |
| #set ( $loginGroup = $intake.Login.Default ) |
| |
| #set ( $valid = true ) |
| #if (!$loginGroup.Username.isValid() ) |
| ## this should be improved ... |
| #if ("$loginGroup.Username.Message" == "username_min_length_msg") |
| #info( $l10n.format("$loginGroup.Username.Message","4") ) |
| #else |
| #info( $l10n.get("$loginGroup.Username.Message") ) |
| #end |
| #set ( $valid = false ) |
| #end |
| |
| #if ( !$loginGroup.Password.isValid() ) |
| #info( $l10n.get("$loginGroup.Password.Message") ) |
| #set ( $valid = false ) |
| #end |
| |
| <p/> |
| #if (! $data.user.hasLoggedIn()) |
| |
| <div class="w3-display-middle w3-card-8 w3-center w3-light-grey" style="max-width: 500px"> |
| |
| <form class="w3-container w3-light-grey" name="login" method="post" enctype="application/x-www-form-urlencoded" action="$link.setAction("LoginUserIntake").setPage($data.templateInfo.screenTemplate)"> |
| <div class="w3-section"> |
| |
| <p> |
| <input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Username" type="text" name="$loginGroup.Username.Key" value="$!loginGroup.Username" tabindex="1" autocomplete="off" autofocus=""> |
| </p> |
| |
| <p> |
| <input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Password" type="password" name="$loginGroup.Password.Key" value="" tabindex="2" autocomplete="off"> |
| </p> |
| |
| <button type="submit" name="submit" id="submit" value="eventSubmit_doPerform" class="w3-ripple" tabindex="3">#if (! $valid ) Retry #else Sign in #end</button> |
| |
| <p/> |
| ##$intake.declareGroups() |
| |
| </div> |
| </form> |
| |
| <!-- default login without Intake --> |
| <!-- |
| <form class="w3-container w3-light-grey" name="login" method="post" action="$link.setAction("LoginUser").setPage($data.templateInfo.screenTemplate)"> |
| <div class="w3-section"> |
| |
| <p> |
| <input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Username" type="text" name="username" value="" tabindex="1" autocomplete="off" autofocus=""> |
| </p> |
| |
| <p> |
| <input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Password" type="password" name="password" value="" tabindex="2" autocomplete="off"> |
| </p> |
| |
| <button type="submit" name="submit" id="submit" value="eventSubmit_doPerform" class="w3-ripple" tabindex="3">Sign in</button> |
| |
| <p/> |
| |
| </div> |
| </form> |
| |
| |
| |
| --> |
| |
| |
| <div class="w3-container w3-border-top w3-padding-16 w3-light-grey"> |
| <span class="w3-right w3-padding w3-hide-small">Forgot <a href="#">password?</a></span> |
| </div> |
| |
| ## Display System messages here if there are any |
| #if($data.getMessage()) |
| #info( $data.getMessage() ) <br/> |
| #end |
| |
| </div> |
| #end |
| |
| ## $intake.declareGroups() |