💄 Restyle some forms

This commit is contained in:
Andreas Schneider 2020-10-31 10:21:26 +01:00
parent 6993a9f58b
commit 1f91686d25
4 changed files with 80 additions and 72 deletions

View File

@ -1,16 +1,20 @@
{{ define "page-styles"}} {{ define "page-styles"}}
<style>
div.controls {
margin-top: 1em;
}
</style>
{{ end }} {{ end }}
{{ define "page-content" }} {{ define "page-content" }}
<form method="post" action="{{ $.URL }}"> <form method="post" action="{{ $.URL }}" class="dialog">
{{ range $k, $v := .Fields }} {{ range $k, $v := .Fields }}
<input type="hidden" name="{{ $k }}" value="{{ $v }}"/> <input type="hidden" name="{{ $k }}" value="{{ $v }}"/>
{{ end }} {{ end }}
<div class="confirm message"> <div class="message">
{{ $.Message }} {{ $.Message }}
</div> </div>
<div> <div class="controls">
<input type="submit" name="_yes" value="Yes"/> <input type="submit" name="_no" value="No"/> <input type="submit" name="_yes" value="Yes"/> <input type="submit" name="_no" value="No"/>
</div> </div>
</form> </form>

View File

@ -1,23 +1,19 @@
{{ define "page-styles"}} {{ define "page-styles"}}
<style> <style>
#content label,
#content label > * {
display: block;
}
</style> </style>
{{ end }} {{ end }}
{{ define "page-content" }} {{ define "page-content" }}
<form method="post"> <form method="post" class="dialog">
<div> <div class="form-content">
<label> <label for="name">Name</label>
Name: <input type="text" width="40" name="name" placeholder="Enter name"/> <input type="text" width="40" id="name" name="name" placeholder="Enter name"/>
</label>
<label> <label for="desc">Role</label>
Role: <textarea rows="5" cols="40" name="description" placeholder="Enter description"></textarea> <textarea rows="5" cols="40" id="desc" name="description" placeholder="Enter description"></textarea>
</label>
</div> </div>
<div> <div class="form-controls">
<input type="submit" value="Create share"/> <input type="submit" value="Create share"/>
</div> </div>
</form> </form>

View File

@ -1,15 +1,20 @@
{{ define "page-content" }} {{ define "page-content" }}
<form method="post"> <form method="post" class="dialog">
<div class="form-content">
<input name="share" type="hidden" value="{{ .ShareId }}"/> <input name="share" type="hidden" value="{{ .ShareId }}"/>
<label>
Login: <input name="login" placeholder="Login name"/> <label for="login">Login</label>
</label> <input name="login" id="login" placeholder="Login name"/>
<label>
Password: <input type="password" name="password" placeholder="Password"/> <label for="password">Password</label>
</label> <input type="password" name="password" id="password" placeholder="Password"/>
<label>
ReadOnly: <input type="checkbox" name="readonly"/> <label for="readonly">ReadOnly</label>
</label> <input type="checkbox" name="readonly" id="readonly"/>
</div>
<div class="form-controls">
<input type="submit" value="Add Login"/> <input type="submit" value="Add Login"/>
</div>
</form> </form>
{{ end }} {{ end }}

View File

@ -1,22 +1,25 @@
{{ define "page-content" }} {{ define "page-content" }}
<form method="post"> <form method="post" class="dialog">
<div class="form-content">
<input name="share" type="hidden" value="{{ .ShareId }}"/> <input name="share" type="hidden" value="{{ .ShareId }}"/>
<label>
User: <label for="user">User</label>
<select name="user"> <select name="user" id="user">
{{ range $user := .Users}} {{ range $user := .Users}}
<option value="{{ $user.Username }}">{{ $user.Username }}</option> <option value="{{ $user.Username }}">{{ $user.Username }}</option>
{{ end }} {{ end }}
</select> </select>
</label>
<label> <label for="role">Role</label>
Role: <select name="role" id="role">
<select name="role">
<option value="reader">Reader</option> <option value="reader">Reader</option>
<option value="writer" selected>Writer</option> <option value="writer" selected>Writer</option>
<option value="admin">Admin</option> <option value="admin">Admin</option>
</select> </select>
</label>
</div>
<div class="form-controls">
<input type="submit" value="Add User"/> <input type="submit" value="Add User"/>
</div>
</form> </form>
{{ end }} {{ end }}