aboutsummaryrefslogtreecommitdiff
path: root/templates/user.qtpl
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-22 18:45:59 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-22 19:35:33 +0200
commit3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae (patch)
tree0f43f30d824b8b805e4a72b66a0ee1bee7397803 /templates/user.qtpl
parent1e4613aa1113b373a8d841c28e222599237a33c5 (diff)
downloadlens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.tar.gz
lens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.tar.bz2
lens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.zip
feat: Add user management
As many things it is on crude state. The settings.go has become a big mess, but I have achieve MVP, so from now one things shall improve as I'll spent more time on refactoring.
Diffstat (limited to 'templates/user.qtpl')
-rw-r--r--templates/user.qtpl54
1 files changed, 54 insertions, 0 deletions
diff --git a/templates/user.qtpl b/templates/user.qtpl
new file mode 100644
index 0000000..ba2f071
--- /dev/null
+++ b/templates/user.qtpl
@@ -0,0 +1,54 @@
+
+{% code
+type UserPage struct {
+ ID *uint
+ Username string
+ Path string
+ IsAdmin bool
+}
+
+%}
+
+{% func (p *UserPage) Title() %}Login{% endfunc %}
+
+{% func (p *UserPage) Content() %}
+<h1>Initial Setup</h1>
+<form action="/users/" method="post">
+ {% if p.ID != nil %}
+ <input type="hidden" name="userId" value="{%s FromUInttoString(p.ID) %}" />
+ {% endif %}
+ <div class="field">
+ <label class="label">Username</label>
+ <div class="control">
+ <input class="input" name="username" type="text" value="{%s p.Username %}">
+ </div>
+ </div>
+
+ {% if p.ID == nil %}
+ <div class="field">
+ <label class="label">Password</label>
+ <div class="control">
+ <input class="input" name="password" type="password">
+ </div>
+ </div>
+ {% endif %}
+ <div class="field">
+ <label class="label">Root folder</label>
+ <div class="control">
+ <input class="input" name="path" type="text" value="{%s p.Path %}">
+ </div>
+ </div>
+ <div class="field">
+ <label class="label">Is Admin?</label>
+ <div class="control">
+ <input type="checkbox" name="isAdmin" type="password" {% if p.IsAdmin %}checked{% endif %}>
+ </div>
+ </div>
+ <div class="field">
+ <input class="button is-pulled-right" value="Save" type="submit">
+ </div>
+</form>
+{% endfunc %}
+
+{% func (p *UserPage) Script() %}
+{% endfunc %}