udemy-go-web-2/cmd/web/templates/one-user.page.gohtml
2024-08-23 21:07:13 +02:00

70 lines
2.1 KiB
Plaintext

{{ template "base". }}
{{ define "title" }}
Admin User
{{ end }}
{{ define "content" }}
<h2 class="mt-5">Admin user</h2>
<hr>
<form method="post"
action=""
name="user_form"
id="user_form"
class="needs-validation"
autocomplete="off"
novalidate>
<div class="mb-3">
<label for="first_name" class="form-label">First Name</label>
<input type="text"
name="first_name"
class="form-control"
required=""
autocomplete="first_name-new">
</div>
<div class="mb-3">
<label for="last_name" class="form-label">Last Name</label>
<input type="text"
name="last_name"
class="form-control"
required=""
autocomplete="last_name-new">
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="text"
name="email"
class="form-control"
required=""
autocomplete="email-new">
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="text"
name="password"
class="form-control"
autocomplete="password-new">
</div>
<div class="mb-3">
<label for="verify_password" class="form-label">Verify Password</label>
<input type="text"
name="verify_password"
class="form-control"
autocomplete="veryfy_password-new">
</div>
<hr>
<div class="float-start">
<a href="javascript:void(0)" class="btn btn-primary" id="saveBtn">Save Changes</a>
<a href="javascript:void(0)" class="btn btn-warning" id="cancelBtn">Cancel</a>
</div>
<div class="float-end">
<a href="javascript:void(0)" class="btn btn-danger" id="deleteBtn">Delete</a>
</div>
<div class="clearfix"></div>
</form>
{{ end }}
{{ define "js" }}
<script type="module">
import {showUser} from "/static/js/users.js"
showUser({{.API}});
</script>
{{ end }}