diff options
Diffstat (limited to 'templates/login.qtpl')
-rw-r--r-- | templates/login.qtpl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/templates/login.qtpl b/templates/login.qtpl index 56394d0..c68fb5f 100644 --- a/templates/login.qtpl +++ b/templates/login.qtpl @@ -1,5 +1,8 @@ {% code -type LoginPage struct {} +type LoginPage struct { + Username string + Err string + } %} {% func (p *LoginPage) Title() %}Login{% endfunc %} @@ -9,7 +12,7 @@ type LoginPage struct {} <div class="field"> <label class="label">Username</label> <div class="control"> - <input class="input" name="username" type="text"> + <input class="input" name="username" value="{%s p.Username %}" type="text"> </div> </div> <div class="field"> @@ -18,9 +21,18 @@ type LoginPage struct {} <input class="input" name="password" type="password"> </div> </div> + <div class="field is-grouped is-grouped-right"> + <input class="button" value="login" type="submit"> + </div> + {% if p.Err != "" %} <div class="field"> - <input class="button is-pulled-right" value="login" type="submit"> + <article class="message is-danger"> + <div class="message-body"> + {%s p.Err %} + </div> + </article> </div> + {% endif %} </form> {% endfunc %} |