Merge pull request 'Allow updating one's email address on the account settings page' (#127) from feature/103-update_email into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #127 Reviewed-by: greg <greg@noreply.kosmos.org>
This commit was merged in pull request #127.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
<p>Welcome <%= @resource.cn %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
<p>Please confirm your email address through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<p>Hello <%= @email %>!</p>
|
||||
<p>Hello <%= @resource.cn %>!</p>
|
||||
|
||||
<% if @resource.try(:unconfirmed_email?) %>
|
||||
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
<p>Hello <%= @resource.cn %>!</p>
|
||||
|
||||
<p>We're contacting you to notify you that your password has been changed.</p>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<p>Hello <%= @resource.cn %>,</p>
|
||||
|
||||
<p>Please confirm your new email address through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my address', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
@@ -1,4 +1,4 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
<p>Hello <%= @resource.cn %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
<p>Hello <%= @resource.cn %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2 <%= custom_class %>"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 312 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-3 <%= custom_class %>"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 338 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit <%= custom_class %>"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 386 B |
@@ -1,13 +1,44 @@
|
||||
<section>
|
||||
<%= tag.section data: {
|
||||
controller: "settings--account--email",
|
||||
"settings--account--email-validation-failed-value": @validation_errors.present?
|
||||
} do %>
|
||||
<h3>E-Mail</h3>
|
||||
<p class="mb-2">
|
||||
<%= label :email, 'Address', class: 'font-bold' %>
|
||||
</p>
|
||||
<p class="flex gap-1 mb-2 sm:w-3/5">
|
||||
<input type="text" id="email" class="grow"
|
||||
value=<%= current_user.email %> disabled="disabled" />
|
||||
</p>
|
||||
</section>
|
||||
<%= form_for(current_user, url: update_email_settings_path, method: "post") do |f| %>
|
||||
<%= hidden_field_tag :section, "account" %>
|
||||
<p class="mb-2">
|
||||
<%= f.label :email, 'Address', class: 'font-bold' %>
|
||||
</p>
|
||||
<p class="mb-2 flex gap-1 sm:w-3/5">
|
||||
<%= f.email_field :email, class: "grow", data: {
|
||||
'settings--account--email-target': 'emailField'
|
||||
}, required: true %>
|
||||
<button type="button" id="edit-email"
|
||||
class="btn-md btn-icon btn-blue shrink-0 hidden initial-visible"
|
||||
data-settings--account--email-target="editEmailButton"
|
||||
data-action="settings--account--email#editEmail"
|
||||
title="Edit email address">
|
||||
<span class="">
|
||||
<%= render partial: "icons/edit-3", locals: {
|
||||
custom_class: "text-white h-4 w-4 inline" } %>
|
||||
</span>
|
||||
</button>
|
||||
</p>
|
||||
<% if @validation_errors.present? && @validation_errors[:email].present? %>
|
||||
<p class="error-msg"><%= @validation_errors[:email].first %></p>
|
||||
<% end %>
|
||||
<div class="initial-hidden">
|
||||
<p class="mt-4 mb-2">
|
||||
<%= f.label :current_password, 'Current password', class: 'font-bold' %>
|
||||
</p>
|
||||
<p class="sm:w-3/5">
|
||||
<%= f.password_field :current_password, class: "w-full", required: true %>
|
||||
</p>
|
||||
<p class="mt-6">
|
||||
<%= f.submit "Update", class: "btn-md btn-blue" %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<section>
|
||||
<h3>Password</h3>
|
||||
<p class="mb-8">Use the following button to request an email with a password reset link:</p>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<% end %>
|
||||
<% if Setting.lndhub_enabled %>
|
||||
<%= render SidenavLinkComponent.new(
|
||||
name: "Wallet", path: setting_path(:lightning), icon: "zap",
|
||||
name: "Lightning", path: setting_path(:lightning), icon: "zap",
|
||||
active: current_page?(setting_path(:lightning))
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user