mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 15:03:01 +00:00
add user to list by id
This commit is contained in:
parent
baf388cb42
commit
215930e3b9
@ -770,6 +770,9 @@ func NewHandler(s *service, verbose bool, staticDir string) http.Handler {
|
|||||||
id, _ := mux.Vars(c.r)["id"]
|
id, _ := mux.Vars(c.r)["id"]
|
||||||
q := c.r.URL.Query()
|
q := c.r.URL.Query()
|
||||||
uid := q.Get("uid")
|
uid := q.Get("uid")
|
||||||
|
if uid == "" {
|
||||||
|
uid = c.r.FormValue("uid")
|
||||||
|
}
|
||||||
err := s.ListAddUser(c, id, uid)
|
err := s.ListAddUser(c, id, uid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -37,6 +37,14 @@
|
|||||||
</span>
|
</span>
|
||||||
<button type="submit"> Search </button>
|
<button type="submit"> Search </button>
|
||||||
</form>
|
</form>
|
||||||
|
<div class="page-title"> Add user by their ID </div>
|
||||||
|
<span>some times it can works, some times not</span>
|
||||||
|
<form class="user-list-action" action="/list/{{$.Data.List.ID}}/adduser?" method="POST">
|
||||||
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||||
|
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
||||||
|
<input name="uid">
|
||||||
|
<button type="submit"> Add </button>
|
||||||
|
</form>
|
||||||
|
|
||||||
{{if .Q}}
|
{{if .Q}}
|
||||||
{{if .SearchAccounts}}
|
{{if .SearchAccounts}}
|
||||||
|
Loading…
Reference in New Issue
Block a user