2014-12-09 17:17:11 +01:00
|
|
|
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2015-01-15 00:39:34 +01:00
|
|
|
<%= render 'flash' %>
|
2014-12-09 17:17:11 +01:00
|
|
|
|
2014-12-09 20:34:50 +01:00
|
|
|
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
2014-12-09 17:17:11 +01:00
|
|
|
<%= devise_error_messages! %>
|
|
|
|
|
|
|
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
|
|
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
|
|
|
<% end %>
|
|
|
|
|
2014-12-09 18:56:56 +01:00
|
|
|
<%= form_password_field f, :password %>
|
|
|
|
<%= form_password_field f, :password_confirmation %>
|
2014-12-09 20:34:50 +01:00
|
|
|
|
2014-12-09 18:56:56 +01:00
|
|
|
<%= form_password_field f, :current_password %>
|
2014-12-09 17:17:11 +01:00
|
|
|
|
2014-12-09 22:32:54 +01:00
|
|
|
<%= f.label :avatar %>
|
|
|
|
<%= f.file_field :avatar %>
|
|
|
|
|
2014-12-09 20:34:50 +01:00
|
|
|
<%= f.submit "Update", class: 'btn btn-primary' %>
|
2014-12-09 17:17:11 +01:00
|
|
|
<% end %>
|
2014-12-10 14:18:56 +01:00
|
|
|
|
|
|
|
<% if current_user.dagschotel.present? %>
|
|
|
|
<h3>Current Dagschotel:</h3>
|
|
|
|
<div>
|
|
|
|
<%= image_tag current_user.dagschotel.avatar %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<h4>Choose new Dagschotel:</h4>
|
|
|
|
<% Product.all.each do |p| %>
|
|
|
|
<%= link_to image_tag(p.avatar), user_dagschotel_path(current_user, p) %>
|
|
|
|
<% end %>
|