diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-22 02:15:44 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-22 02:15:44 -0700 |
commit | f6f50b620e7f4a4ba25f4cb24fc8ea52e2b97975 (patch) | |
tree | bc8c835fe719ccee7671e331e3c92a38953258f6 /system/admin/admin.go | |
parent | 80f84a6d61714945cbd92f646d2131ba650c6912 (diff) |
adding initial support to edit and add admin users
Diffstat (limited to 'system/admin/admin.go')
-rw-r--r-- | system/admin/admin.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/admin/admin.go b/system/admin/admin.go index 243af1f..4a72af0 100644 --- a/system/admin/admin.go +++ b/system/admin/admin.go @@ -5,7 +5,6 @@ package admin import ( "bytes" "encoding/json" - "fmt" "html/template" "net/http" @@ -293,6 +292,7 @@ func UsersList(req *http.Request) ([]byte, error) { <ul class="users row"> <div class="card-title">Remove Admin Users</div> {{ range .Users }} + {{ if .Email}} <li class="col s12"> {{ .Email }} <form enctype="multipart/form-data" class="delete-user __ponzu right" action="/admin/configure/users/delete" method="post"> @@ -302,6 +302,7 @@ func UsersList(req *http.Request) ([]byte, error) { </form> <li> {{ end }} + {{ end }} </ul> </div> ` @@ -347,8 +348,6 @@ func UsersList(req *http.Request) ([]byte, error) { } } - fmt.Println(usrs) - // make buffer to execute html into then pass buffer's bytes to Admin buf := &bytes.Buffer{} tmpl := template.Must(template.New("users").Parse(html + script)) |