aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/login.qtpl18
-rw-r--r--templates/register.qtpl4
2 files changed, 17 insertions, 5 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 %}
diff --git a/templates/register.qtpl b/templates/register.qtpl
index 115edfe..4d3c545 100644
--- a/templates/register.qtpl
+++ b/templates/register.qtpl
@@ -25,8 +25,8 @@ type RegisterPage struct {}
<input class="input" name="path" type="text">
</div>
</div>
- <div class="field">
- <input class="button is-pulled-right" value="Save" type="submit">
+ <div class="field is-grouped is-grouped-right">
+ <input class="button" value="Save" type="submit">
</div>
</form>
{% endfunc %}