add mail+pass change option
This commit is contained in:
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