Change how unconfirmed accounts are displayed in admin UI (#17874)
Fix #17815
This commit is contained in:
parent
52813830be
commit
2dd30804b6
|
@ -128,13 +128,13 @@ class Account < ApplicationRecord
|
||||||
:approved?,
|
:approved?,
|
||||||
:pending?,
|
:pending?,
|
||||||
:disabled?,
|
:disabled?,
|
||||||
|
:unconfirmed?,
|
||||||
:unconfirmed_or_pending?,
|
:unconfirmed_or_pending?,
|
||||||
:role,
|
:role,
|
||||||
:admin?,
|
:admin?,
|
||||||
:moderator?,
|
:moderator?,
|
||||||
:staff?,
|
:staff?,
|
||||||
:locale,
|
:locale,
|
||||||
:hides_network?,
|
|
||||||
:shows_application?,
|
:shows_application?,
|
||||||
to: :user,
|
to: :user,
|
||||||
prefix: true,
|
prefix: true,
|
||||||
|
|
|
@ -208,8 +208,12 @@ class User < ApplicationRecord
|
||||||
confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial? && account.moved_to_account_id.nil?
|
confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial? && account.moved_to_account_id.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def unconfirmed?
|
||||||
|
!confirmed?
|
||||||
|
end
|
||||||
|
|
||||||
def unconfirmed_or_pending?
|
def unconfirmed_or_pending?
|
||||||
!(confirmed? && approved?)
|
unconfirmed? || pending?
|
||||||
end
|
end
|
||||||
|
|
||||||
def inactive_message
|
def inactive_message
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.batch-table__row{ class: [!account.suspended? && account.user_pending? && 'batch-table__row--attention', account.suspended? && 'batch-table__row--muted'] }
|
.batch-table__row{ class: [!account.suspended? && account.user_pending? && 'batch-table__row--attention', (account.suspended? || account.user_unconfirmed?) && 'batch-table__row--muted'] }
|
||||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||||
= f.check_box :account_ids, { multiple: true, include_hidden: false }, account.id
|
= f.check_box :account_ids, { multiple: true, include_hidden: false }, account.id
|
||||||
.batch-table__row__content.batch-table__row__content--unpadded
|
.batch-table__row__content.batch-table__row__content--unpadded
|
||||||
|
|
Loading…
Reference in New Issue