Create user
This commit is contained in:
@ -389,7 +389,7 @@ func (app *application) ShowSale(w http.ResponseWriter, r *http.Request) {
|
||||
stringMap["refund-badge"] = "Refunded"
|
||||
|
||||
intMap := make(map[string]int)
|
||||
intMap["isRefund"] = 1
|
||||
intMap["is-refund"] = 1
|
||||
|
||||
if err := app.renderTemplate(w, r, "sale", &templateData{
|
||||
StringMap: stringMap,
|
||||
|
@ -22,7 +22,7 @@ All Users
|
||||
{{ end }}
|
||||
{{ define "js" }}
|
||||
<script type="module">
|
||||
import {showUsers} from "/static/js/all-users.js"
|
||||
import {showUsers} from "/static/js/users.js"
|
||||
showUsers({{.API}});
|
||||
</script>
|
||||
{{ end }}
|
||||
|
@ -5,7 +5,65 @@ Admin User
|
||||
{{ 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 }}
|
||||
|
||||
|
Reference in New Issue
Block a user