[%# manage/banusers.tt Ban and unban users, and edit ban notes. Conversion of htdocs/manage/banusers.bml Authors: Momiji Copyright (c) 2015-2022 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [%- sections.title = ".title" | ml -%] [%- CALL dw.active_resource_group( "foundation" ) -%] [%- dw.need_res( { group => "foundation" } "stc/css/components/tables-as-list.css" "js/components/jquery.select-all.js" "stc/css/components/select-all.css" ) -%]
[%- authas_html -%]
[% dw.form_auth() %] [%# ban users %]

[% dw.ml('.header.ban') %]

[% u.is_community ? dw.ml('.intro.ban.comm') : dw.ml('.intro.ban.self') %]

[% form.textarea( name => "ban_list", rows => 3, cols => 50, value => editvals.user, ) %] [%# add note if desired %]

[% dw.ml('.header.bannote') %]

[% u.is_community ? dw.ml('.intro.bannote.comm') : dw.ml('.intro.bannote.self') %]

[% dw.ml('.editwarn') %]

[% form.textarea( name => "ban_note", rows => 3, cols => 50, value => $separate_add_from_edit ? "" : editvals.note, ) %] [% IF separate_add_from_edit %] [% form.textarea( label = dw.ml( '.note.previous' ) name => "ban_note_previous", id => "ban_note_previous", rows => 3, cols => 50, value => editvals.note, ) %] [% END %] [%# unban users %]

[% dw.ml('.header.unban') %]

[% IF banned %]

[% u.is_community ? dw.ml('.intro.unban.comm') : dw.ml('.intro.unban.self') %]

[%- FOREACH ban = banned_array -%] [%# encourage the user to edit the existing note %] [%- END -%]
[% 'select_all.label' | ml %] [% dw.ml('.key.user') %] [% dw.ml('.note') %]
[%- form.checkbox_nested( name='unban_user', value=ban.banuid, remember_old_state = 1 ) -%] [% ban.user.ljuser_display %] [% ban.note %][% IF ban.note %] [% form.submit(name = "edit_ban_${ban.banuid}", value = dw.ml('.btn.edit') ) %][% END %]
[% ELSE %]

[% u.is_community ? dw.ml('.intro.unban.comm.none') : dw.ml('.intro.unban.self.none') %]

[% END %]

[% form.submit(value = dw.ml('.btn.banunban') ) %]