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

View File

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

View File

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

View File

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