Merge pull request #4878 from consul/verification_info
Show verification info only if verification is enabled
This commit is contained in:
17
app/components/account/verify_account_component.html.erb
Normal file
17
app/components/account/verify_account_component.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="verify-account">
|
||||
<% if account.level_three_verified? %>
|
||||
<p class="already-verified">
|
||||
<%= t("account.show.verified_account") %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p>
|
||||
<%= t("account.show.user_permission_verify") %>
|
||||
</p>
|
||||
|
||||
<% if account.level_two_verified? %>
|
||||
<%= link_to t("account.show.finish_verification"), verification_path, class: "button success" %>
|
||||
<% else %>
|
||||
<%= link_to t("account.show.verify_my_account"), verification_path, class: "button success" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
11
app/components/account/verify_account_component.rb
Normal file
11
app/components/account/verify_account_component.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Account::VerifyAccountComponent < ApplicationComponent
|
||||
attr_reader :account
|
||||
|
||||
def initialize(account)
|
||||
@account = account
|
||||
end
|
||||
|
||||
def render?
|
||||
Setting["feature.user.skip_verification"].blank? && !account.organization?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user