aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views/login.rocker.html
blob: 6cd28f2ce725859431545926b15b1f09e61460eb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@args (String message, Integer counter)

@js => {
<script>const counter = @counter;</script>
<script src="/js/login.js"></script>
}

@layout.template("Login", RockerContent.NONE, js) -> {
<form action="/login" id="login-form" method="post">
    <div>
        <label for="username">Username:</label>
        <input id="username" name="username" type="text"/>
    </div>
    <div>
        <label for="password">Password:</label>
        <input id="password" name="password" type="password"/>
    </div>

    <button type="submit">Login</button>

    @if(message.length() > 0) {
    <small>@message</small>
    }

    @if(counter > 0) {
    <small id="tryAgain">Please try again in <span id="counter">@counter</span> seconds.</small>
    }
</form>
}