2025-04-24 20:18:27 -07:00
< form method = "POST" action = "{{webPath `manage/bans`}}" class = "banform" >
{{if gt .ban.ID 0}}
< input type = "hidden" name = "do" value = "edit" / >
{{- else -}}
2018-10-08 11:14:45 -07:00
< input type = "hidden" name = "do" value = "add" / >
2025-04-24 20:18:27 -07:00
{{- end -}}
2022-11-16 15:11:55 -08:00
< h2 > Add IP ban< / h2 >
2018-10-05 15:21:36 -07:00
< table >
2025-04-24 20:18:27 -07:00
< tr > < th > IP/Mask< / th > < td > < input type = "text" name = "ip" size = "45" value = "{{banMask .ban}}" length = "30" / > < / td > < / tr >
< tr > < th > Duration< / th > < td > < input type = "text" name = "duration" size = "45" { { if gt . ban . ID 0 } } value = "{{until .ban.ExpiresAt}}" { { end } } / > < / td > < / tr >
< tr > < th > < / th > < td > Example: '1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds', '1y2mo3w4d5h6m7s', etc< br / > If blank, this is a permanent ban< / td > < / tr >
< tr > < th > Appeal wait time< / th > < td > < input type = "text" name = "appealwait" id = "appealwait" size = "45" > < label > < input type = "checkbox" name = "noappeals" / > No appeals< / label > < / td > < / tr >
< tr > < th > < / th > < td > Same syntax as above, but optional. If left blank, they can appeal immediately< / td > < / tr >
2022-11-17 16:32:28 -08:00
< tr > < th > Thread starting ban< / th > < td > < input type = "checkbox" name = "threadban" / > (user can reply to threads but can't make new threads)< / td > < / tr >
2022-11-16 15:11:55 -08:00
{{with $.bannedForPostID}}< tr > < th > Banned for post ID< / th > < td > {{$.bannedForPostID}}< / td > < / tr > {{end}}
< tr > < th > Board< / th > < td > < select name = "boardid" id = "boardid" >
< option value = "0" > All boards< / option >
{{- range $b, $board := $.allBoards -}}
2022-11-17 16:32:28 -08:00
< option value = "{{$board.ID}}" { { if eq ( dereference $ . ban . BoardID ) $ board . ID } } selected { { end } } > /{{$board.Dir}}/ - {{$board.Title}}< / option >
2022-11-16 15:11:55 -08:00
{{- end -}}
< / select > < / td > < / tr >
2025-04-29 22:29:21 -07:00
{{- with $.postID -}}
< input type = "hidden" name = "postid" value = "{{.}}" / >
< tr > < th > Public ban message< / th > < td > < input type = "checkbox" name = "usebannedmessage" > < input type = "text" name = "bannedmessage" size = "44" value = "{{$.boardConfig.BanMessage}}" length = "30" / > < / td > < / tr >
{{- end -}}
2025-05-08 19:43:25 -07:00
< tr > < th > Reason< / th > < td > < textarea name = "reason" rows = "6" cols = "40" placeholder = "Message to be displayed to the banned user" > < / textarea > < / td > < / tr >
2025-04-29 22:29:21 -07:00
< tr > < th > Staff note< / th > < td > < textarea name = "staffnote" rows = "6" cols = "40" placeholder = "Private note that only staff can see" >
{{- with $.postID -}}
Ban placed for post {{.}}
{{- end -}}
< / textarea > < / td > < / tr >
2018-10-05 15:21:36 -07:00
< / table >
2023-01-04 15:33:50 -08:00
< input type = "submit" value = "Ban user" / > < input type = "button" name = "docancel" value = "Cancel" onclick = "window.location = './manage/bans'; return false" / >
2018-10-08 11:14:45 -07:00
< / form >
2018-10-03 00:31:43 -07:00
2022-11-17 16:32:28 -08:00
< h2 id = "banlist" > Banlist< / h2 >
2025-04-24 20:18:27 -07:00
< form action = "{{webPath `manage/bans`}}" method = "get" >
Filter board: < select name = "filterboardid" id = "filterboardid" onchange = "window.location = '{{webPath `manage/bans?filterboardid=`}}' + this.value + '#banlist'" >
2022-11-17 16:32:28 -08:00
< option value = "0" > All boards< / option >
{{- range $b, $board := $.allBoards -}}
< option value = "{{$board.ID}}" { { if eq $ . filterboardid $ board . ID } } selected { { end } } > /{{$board.Dir}}/ - {{$board.Title}}< / option >
{{- end -}}
< / select > < input type = "submit" >
< / form >
2024-03-08 14:50:28 -08:00
< table class = "mgmt-table banlist" >
2022-11-17 16:32:28 -08:00
< tr > < th > Action< / th > < th > IP< / th > < th > Board< / th > < th > Reason< / th > < th > Staff< / th > < th > Staff note< / th > < th > Banned post text< / th > < th > Set< / th > < th > Expires< / th > < th > Appeal at< / th > < / tr >
2022-11-16 15:11:55 -08:00
{{range $_, $ban := $.banlist -}}
< tr >
2024-03-08 14:50:28 -08:00
< td class = "table-actions" > < a href = "{{webPath `manage/bans?edit=`}}{{$ban.ID}}" > Edit< / a > | < a href = "{{webPath `manage/bans?delete=`}}{{$ban.ID}}" > Delete< / a > < / td >
2023-12-31 18:02:42 -08:00
< td > {{banMask $ban}}< / td >
2022-11-16 15:11:55 -08:00
< td > {{if not $ban.BoardID}}< i > all< / i > {{else}}/{{getBoardDirFromID $ban.BoardID}}/{{end}}< / td >
< td > {{$ban.Message}}< / td >
< td > {{getStaffNameFromID $ban.StaffID}}< / td >
< td > {{$ban.StaffNote}}< / td >
< td > {{if not $ban.BannedForPostID}}< i > N/A< / i > {{else}}{{$ban.CopyPostText}}{{end}}< / td >
< td > {{formatTimestamp $ban.IssuedAt}}< / td >
< td >
{{- if $ban.Permanent}}< i > Never< / i > {{else}}{{formatTimestamp $ban.ExpiresAt}}{{end -}}
< / td >
< td >
{{- if $ban.CanAppeal}}{{formatTimestamp $ban.AppealAt}}{{else}}< i > Never< / i > {{end -}}
< / td >
< / tr >
2022-04-14 21:20:32 -07:00
{{end}}< / table >