tap/app/views/devise/registrations/edit.html.erb

28 lines
729 B
Text
Raw Normal View History

2014-12-09 17:17:11 +01:00
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= render 'flash' %>
2014-12-09 17:17:11 +01:00
2015-02-09 11:58:43 +01:00
<%= f_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= f.error_messages %>
2014-12-09 17:17:11 +01:00
2015-02-09 11:58:43 +01:00
<%= f.password_field :password %>
<%= f.password_field :password_confirmation %>
2014-12-09 17:17:11 +01:00
2015-02-09 11:58:43 +01:00
<%= f.password_field :current_password %>
2014-12-09 22:32:54 +01:00
<%= f.file_field :avatar %>
2015-02-09 11:58:43 +01:00
<%= f.submit "Update" %>
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 %>