Skip to content

Commit

Permalink
Merge pull request #560 from codeforjapan/update-account-show
Browse files Browse the repository at this point in the history
Update account#show in v0.27.4
  • Loading branch information
ayuki-joto authored Sep 27, 2023
2 parents 38b3d66 + 7234937 commit 467b8d8
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions decidim-user_extension/app/views/decidim/account/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
<%= alert_box("", "account-notification hide", true) %>
<% add_decidim_page_title(t("profile", scope: "layouts.decidim.user_menu")) %>
<% content_for(:subtitle) { t("profile", scope: "layouts.decidim.user_menu") } %>

<div class="row">
<%= decidim_form_for(@account, url: account_path, method: :put, html: { autocomplete: "off" }) do |f| %>
<input autocomplete="off" name="hidden" type="password" style="display:none;">
<%= decidim_form_for(@account, url: account_path, method: :put, html: { autocomplete: "on" }) do |f| %>
<div class="columns large-4">
<%= f.upload :avatar %>
</div>

<div class="columns large-8 end">
<% if current_user.unconfirmed_email.present? %>
<div id="email-change-pending" class="callout secondary">
<p><strong><%= t("decidim.account.email_change.title") %></strong></p>
<p><%= t("decidim.account.email_change.body1", unconfirmed_email: current_user.unconfirmed_email) %></p>
<p>
<%== t(
"decidim.account.email_change.body2",
resend_link: link_to(t("decidim.account.email_change.send_again"), resend_confirmation_instructions_account_path, role: :button, method: :post, remote: true),
cancel_link: link_to(t("decidim.account.email_change.cancel"), cancel_email_change_account_path, role: :button, method: :post, remote: true)) %>
</p>
</div>
<% end %>

<%= form_required_explanation %>

<%= f.text_field :name %>
<%= f.text_field :nickname %>
<%= f.email_field :email %>
<%= f.url_field :personal_url %>
<%= f.text_field :name, autocomplete: "name" %>
<%= f.text_field :nickname, autocomplete: "nickname" %>
<%= f.email_field :email, disabled: current_user.unconfirmed_email.present?, autocomplete: "email" %>
<%= f.url_field :personal_url, autocomplete: "url" %>
<%= f.text_area :about, rows: 5 %>

<%= f.collection_select(
Expand All @@ -36,7 +49,7 @@
<% else %>
<% if current_organization.sign_in_enabled? %>
<p>
<a data-toggle="passwordChange" class="change-password" href="#passwordChange"><%= t ".change_password" %></a>
<button type="button" data-toggle="passwordChange" class="link change-password"><%= t ".change_password" %></button>
</p>
<div id="passwordChange" class="toggle-show" data-toggler=".is-expanded">
<%= render partial: "password_fields", locals: { form: f } %>
Expand Down

0 comments on commit 467b8d8

Please sign in to comment.