add mail+pass change option
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<div style="font-family: 'Oswald','Calibri','Arial','DejaVu Sans','Open Sans','Lucida Sans','Lucida Grande','Lucida Sans Unicode',sans-serif; background: #F2F2F2">
|
||||
<div style="color: rgb(63, 63, 63); width: 600px; max-width: 100%; padding: 2em; margin: auto">
|
||||
Hi <%= @user.name %>!
|
||||
|
||||
<p>You changed your email on Redstoner.com!</p>
|
||||
<p>Please <%= link_to "confirm", confirm_user_url(@user, code: @user.email_token), style: "text-decoration: none; color: #4096EE;" %> your new email address (<b><%= @user.email %></b>).</p>
|
||||
|
||||
<div>
|
||||
<p>Please click this link to confirm your new email:
|
||||
</p>
|
||||
<div width="100%" style="background-color: #ddd; padding: 1em; margin: 0; text-align: center;">
|
||||
<%= link_to "confirm email change", confirm_user_url(@user, code: @user.email_token), style: "text-decoration: none; color: #f2f2f2; padding: 0.5em 2em; background-color: #4096EE; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; display: inline-block; text-transform: uppercase;" %>
|
||||
</div>
|
||||
<p></p>
|
||||
|
||||
<p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game.</p>
|
||||
<p>Your Redstoner team</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="background: none repeat scroll 0% 0% rgb(68, 68, 68); width: 100%; padding: 2em; color: rgb(255, 255, 255); margin:auto; text-align: center;">
|
||||
<p><i>If you did not change your mail on redstoner.com please ignore this email!</i>
|
||||
</p>
|
||||
<p>You can contact us via:
|
||||
<%= link_to "Website", root_url, style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,7 +4,7 @@
|
||||
end
|
||||
%>
|
||||
|
||||
<%= link_to (@user.is?(current_user) ? "Your profile" : @user.name), current_user %> → Edit
|
||||
<%= link_to @user.name, current_user %> → Edit
|
||||
<h1>Edit profile</h1>
|
||||
|
||||
<%= form_for @user do |f| %>
|
||||
@@ -60,7 +60,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><%= f.submit "Save profile", class: "btn blue", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
|
||||
<p><%= f.submit "Save profile", class: "btn blue left", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
|
||||
<p><%= link_to "Edit login details", edit_login_user_path(@user), class: "btn blue right" %></p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<% if !@user.confirmed? %>
|
||||
<% if @user.is?(current_user) %>
|
||||
|
||||
36
app/views/users/edit_login.html.erb
Normal file
36
app/views/users/edit_login.html.erb
Normal file
@@ -0,0 +1,36 @@
|
||||
<%= link_to @user.name, @user %> → Edit Login credentials
|
||||
<h1>Edit Login credentials</h1>
|
||||
|
||||
|
||||
<%= form_for @user, url: update_login_user_path(@user), method: :put do |f| %>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>New email</td>
|
||||
<td>
|
||||
<%= f.text_field :email %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New password</td>
|
||||
<td>
|
||||
<%= f.password_field :password %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repeat new password</td>
|
||||
<td>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current password</td>
|
||||
<td>
|
||||
<%= password_field_tag :current_password, nil, disabled: !@user.is?(current_user) %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><%= f.submit "Save changes", class: "btn blue left" %></p>
|
||||
<div class="clear"></div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user