-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Backport language selector and allow to modify notification sen…
…ding frequency (#505) * feat: Backport Extra User Fields account specs * fix: Extra Signup Fields form account * fix: Friendly Signup initializer * fix: Add account specs * feat: Disable locale selector in my account * fix: Create registration spec * ci: Add CA ES locales in CI * fix: Add translations keys * fix: Deprecated spe * feat: Allow to modify default notification sending frequency
- Loading branch information
1 parent
7bc1f00
commit b67b452
Showing
12 changed files
with
541 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<%= 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: "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, 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 %> | ||
|
||
<% if @account.organization.available_locales.size > 1 %> | ||
<%= f.collection_select( | ||
:locale, | ||
@account.organization.available_locales, | ||
:to_s, | ||
->(locale) {locale_name(locale) } | ||
) %> | ||
<% else %> | ||
<%= f.collection_select( | ||
:locale, | ||
@account.organization.available_locales, | ||
:to_s, | ||
->(locale) {locale_name(locale) }, | ||
{}, | ||
{ disabled: true } | ||
) | ||
%> | ||
<% end %> | ||
|
||
<p class="help-text"><%= t(".available_locales_helper") %></p> | ||
|
||
<% if @account.errors[:password].any? || @account.errors[:password_confirmation].any? %> | ||
<%= render partial: "password_fields", locals: { form: f } %> | ||
<% else %> | ||
<% if current_organization.sign_in_enabled? %> | ||
<p> | ||
<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 } %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
|
||
<%= f.submit t(".update_account") %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.