Skip to content

Commit 8b4cdd3

Browse files
committed
Clarify email confirmation checkbox instructions
Improves UX and reduces confusion when updating a user's email confirmation status. - Moved confirmation status inline with the "Email status:" heading - Updated checkbox helper text to reflect current @user.confirmed? state: - Shows "(Check to confirm email)" if unconfirmed - Shows "(Uncheck to unconfirm email)" if confirmed
1 parent b00f75b commit 8b4cdd3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<div class="form-group col-xs-12">
2-
<%= f.label(:confirmed_at, _('Email Confirmation Status'), class: 'control-label') %>
2+
<%= f.label(:confirmed_at, _('Email status: '), class: 'control-label') %>
3+
<%= @user.confirmed? ? _("Confirmed.") : _("Unconfirmed.") %>
34
<br>
45
<% is_checkbox_disabled = @user.can_super_admin? && @user.confirmed_at.present? %>
56
<%= f.check_box(:confirmed_at, { checked: @user.confirmed?,
67
disabled: is_checkbox_disabled,
78
style: 'vertical-align: middle;
89
margin-top: -2px;' }) %>
9-
<%= @user.confirmed? ? _("Confirmed.") : _("Unconfirmed.") %>
10-
<%= content_tag(:small, _("(Use checkbox to change status.)")) unless is_checkbox_disabled %>
10+
<% checkbox_helper_text = @user.confirmed? ? _('(Uncheck to unconfirm email)') : _('(Check to confirm email)') %>
11+
<%= content_tag(:small, checkbox_helper_text) unless is_checkbox_disabled %>
1112
</div>

0 commit comments

Comments
 (0)