|
4 | 4 | <h2>Edit <%= resource_name.to_s.humanize %></h2> |
5 | 5 |
|
6 | 6 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> |
7 | | - <%= devise_error_messages! %> |
8 | | - |
9 | | - <div class="form-group"> |
10 | | - <%= f.label :email %> |
11 | | - <%= f.email_field :email, autofocus: true, class: "form-control" %> |
12 | | - </div> |
13 | | - |
14 | | - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> |
15 | | - <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> |
16 | | - <% end %> |
17 | | - |
18 | | - <div class="form-group"> |
19 | | - <%= f.label :nickname %> |
20 | | - <%= f.text_field :nickname, class: "form-control" %> |
21 | | - </div> |
22 | | - |
23 | | - <div class="form-group"> |
24 | | - <%= f.label :password %> <i>(leave blank if you don't want to change it)</i> |
25 | | - <%= f.password_field :password, autocomplete: "off", class: "form-control" %> |
26 | | - </div> |
27 | | - |
28 | | - <div class="form-group"> |
29 | | - <%= f.label :password_confirmation %> |
30 | | - <%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control" %> |
31 | | - </div> |
32 | | - |
33 | | - <div class="form-group"> |
34 | | - <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i> |
35 | | - <%= f.password_field :current_password, autocomplete: "off", class: "form-control" %> |
36 | | - </div> |
37 | | - |
38 | | - <div class="form-buttons"> |
39 | | - <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-default" %> |
40 | | - <%= link_to "Back", :back, class: "btn btn-default" %> |
41 | | - <%= f.submit "Update", class: "btn btn-default" %> |
42 | | - </div> |
43 | | - |
| 7 | + <%= devise_error_messages! %> |
| 8 | + |
| 9 | + <div class="form-group"> |
| 10 | + <%= f.label :email %> |
| 11 | + <%= f.email_field :email, autofocus: true, class: "form-control" %> |
| 12 | + </div> |
| 13 | + |
| 14 | + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> |
| 15 | + <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> |
| 16 | + <% end %> |
| 17 | + |
| 18 | + <div class="form-group"> |
| 19 | + <%= f.label :nickname %> |
| 20 | + <%= f.text_field :nickname, class: "form-control" %> |
| 21 | + </div> |
| 22 | + |
| 23 | + <% if current_user.provider == nil %> |
| 24 | + <div class="form-group"> |
| 25 | + <%= f.label :password %> <i>(leave blank if you don't want to change it)</i> |
| 26 | + <%= f.password_field :password, autocomplete: "off", class: "form-control" %> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div class="form-group"> |
| 30 | + <%= f.label :password_confirmation %> |
| 31 | + <%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control" %> |
| 32 | + </div> |
| 33 | + |
| 34 | + |
| 35 | + <div class="form-group"> <i>수정하기 위해선 비밀번호를 입력해야 합니다</i> |
| 36 | + <%= f.label :current_password %> |
| 37 | + <%= f.password_field :current_password, autocomplete: "off", class: "form-control" %> |
| 38 | + </div> |
| 39 | + <% end %> |
| 40 | + |
| 41 | + <div class="form-buttons"> |
| 42 | + <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-default" %> |
| 43 | + <%= link_to "Back", :back, class: "btn btn-default" %> |
| 44 | + <%= f.submit "Update", class: "btn btn-default" %> |
| 45 | + </div> |
| 46 | + |
44 | 47 | <% end %> |
45 | 48 |
|
46 | 49 | </div> |
|
0 commit comments