reenable password confirmation before user deletion

pull/6346/head
Jens Ulferts 6 years ago
parent fde01a1f67
commit 021fb3bf51
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 73
      app/views/users/deletion_info.html.erb
  2. 4
      config/locales/en.yml

@ -27,41 +27,44 @@ See docs/COPYRIGHT.rdoc for more details.
++#%>
<% html_title(l(:label_administration), "#{ l('account.deletion_info.heading', name: @user.name)}") -%>
<%= labelled_tabular_form_for(
:user,
url: user_path(@user),
html: {
method: :delete, class: 'confirm_required form danger-zone',
data: { :'request-for-confirmation' => '' }
}) do %>
<div class='wiki'>
<section class="form--section">
<h3 class="form--section-title">
<%= l('account.deletion_info.heading', name: "<em>#{h(@user.name)}</em>").html_safe %>
</h3>
<p>
<%= l("account.deletion_info.login_consequences.#{User.current == @user ? 'self' : 'other'}") %>
</p>
<%= activate_angular_js do %>
<%= labelled_tabular_form_for(
:user,
url: user_path(@user),
html: {
method: :delete, class: 'confirm_required form danger-zone',
data: { :'request-for-confirmation' => '' }
}) do %>
<div class='wiki'>
<section class="form--section">
<h3 class="form--section-title">
<%= l('account.deletion_info.heading', name: "<em>#{h(@user.name)}</em>").html_safe %>
</h3>
<p>
<%= l("account.deletion_info.data_consequences.#{User.current == @user ? 'self' : 'other'}") %>
</p>
<p class="danger-zone--warning">
<span class="icon icon-error"></span>
<span><%= l("account.deletion_info.info.#{User.current == @user ? 'self' : 'other'}") %></span>
</p>
<p>
<%= l("account.deletion_info.login_verification.#{User.current == @user ? 'self' : 'other'}",
name: "<em class=\"danger-zone--expected-value\">#{h(@user.login)}</em>").html_safe %>
</p>
<div class="danger-zone--verification">
<input type="text" name="login_verification"/>
<%= styled_button_tag '', class: '-highlight', disabled: true do
concat content_tag :i, '', class: 'button--icon icon-delete'
concat content_tag :span, l(:button_delete), class: 'button--text'
end %>
</div>
</section>
</div>
<p>
<%= l("account.deletion_info.login_consequences.#{User.current == @user ? 'self' : 'other'}") %>
</p>
<p>
<%= l("account.deletion_info.data_consequences.#{User.current == @user ? 'self' : 'other'}") %>
</p>
<p class="danger-zone--warning">
<span class="icon icon-error"></span>
<span><%= l("account.deletion_info.info.#{User.current == @user ? 'self' : 'other'}") %></span>
</p>
<p>
<%= l("account.deletion_info.login_verification.#{User.current == @user ? 'self' : 'other'}",
name: "<em class=\"danger-zone--expected-value\">#{h(@user.login)}</em>").html_safe %>
</p>
<div class="danger-zone--verification">
<input type="text" name="login_verification"/>
<%= styled_button_tag '', class: '-highlight', disabled: true do
concat content_tag :i, '', class: 'button--icon icon-delete'
concat content_tag :span, l(:button_delete), class: 'button--text'
end %>
</div>
</section>
</div>
<% end %>
<% end %>

@ -265,8 +265,8 @@ en:
other: "The account will be deleted from the system. Therefore, the user will no longer be able to log in with his current credentials. He/she can choose to become a user of this application again by the means this application grants."
self: "Your account will be deleted from the system. Therefore, you will no longer be able to log in with your current credentials. If you choose to become a user of this application again, you can do so by using the means this application grants."
login_verification:
other: "Enter the login %{name} to verify the deletion. Once submitted, you will be ask to confirm your password."
self: "Enter your login %{name} to verify the deletion. Once submitted, you will be ask to confirm your password."
other: "Enter the login %{name} to verify the deletion. Once submitted, you will be asked to confirm your password."
self: "Enter your login %{name} to verify the deletion. Once submitted, you will be asked to confirm your password."
error_inactive_activation_by_mail: >
Your account has not yet been activated.
To activate your account, click on the link that was emailed to you.

Loading…
Cancel
Save