edit.html.erb
3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<div class="page-header">
<h1><%= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}") %></h1>
</div>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %>
<%= devise_error_messages! %>
<div class="row margin-left-none">
<div class="form-table col-md-9">
<div class="form-row">
<div class="field-container">
<%= f.label :name, class: 'control-label' %><br />
<%= f.text_field :name, :autofocus => true, class: 'text-field form-control' %>
</div>
<div class="help-container">
<p>
<%= t('.your_full_name')%>
</p>
</div>
</div>
<div class="form-row">
<div class="field-container">
<%= f.label :email, class: 'control-label' %><br />
<%= f.email_field :email, class: 'text-field form-control' %>
<%- if devise_mapping.confirmable? && resource.pending_reconfirmation? -%>
<p>
<%= t('.currently_waiting_confirmation_for_email', :email => resource.unconfirmed_email, :default => "Currently waiting confirmation for: %{email}") %>
</p>
<%- end -%>
</div>
<div class="help-container">
<p>
<%= t('.your_email_is_our_communication_channel')%>
</p>
</div>
</div>
<% if current_user && current_user.provider.nil? %>
<div class="form-row">
<div class="field-container">
<%= f.label :password, class: 'control-label' %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', :default => "leave blank if you don't want to change it") %>)</i><br />
<%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %>
</div>
<div class="help-container">
<p>
<%= t('.password_instructions')%>
</p>
</div>
</div>
<div class="form-row">
<div class="field-container">
<%= f.label :password_confirmation, class: 'control-label' %><br />
<%= f.password_field :password_confirmation, class: 'text-field form-control' %>
</div>
<div class="help-container">
<p>
<%= t('.confirm_your_password')%>
</p>
</div>
</div>
<div class="form-row">
<div class="field-container">
<%= f.label :current_password, class: 'control-label' %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', :default => 'we need your current password to confirm your changes') %>)</i><br />
<%= f.password_field :current_password, class: 'text-field form-control' %>
</div>
<div class="help-container">
<p>
<%= t('.current_password_required')%>
</p>
</div>
</div>
<% end %>
<div class="row margin-left-none" style="margin-top: 20px">
<%= f.submit t('.update', :default => "Update"), class: 'btn btn-primary col-md-2' %>
</div>
</div>
</div>
<% end %>
<hr />
<h2><%= t('.cancel_my_account', :default => 'Cancel my account') %></h2>
<p><%= t('.unhappy', :default => 'Unhappy') %>? <%= link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete, class: 'btn btn-warning' %>.</p>
<%= link_to t('devise.shared.links.back', :default => "Back"), :back, class: 'btn btn-default' %>