2018-08-29 13:53:39 +00:00
|
|
|
<div class="profile-container">
|
|
|
|
<%= simple_form_for(@user) do |t| %>
|
|
|
|
<div class="profile-form">
|
|
|
|
<div>
|
|
|
|
<%= t.input :email %>
|
|
|
|
<%= t.input :first_name %>
|
|
|
|
<%= t.input :last_name %>
|
|
|
|
<%= t.input :password %>
|
2018-08-29 15:58:21 +00:00
|
|
|
<%= t.input :photo %>
|
2018-08-29 13:53:39 +00:00
|
|
|
|
|
|
|
<%= t.submit :Save, class: "btn btn-primary save-btn form-control" %>
|
|
|
|
<p></p>
|
|
|
|
<%= link_to "View my profile", user_path(@user), class: "btn btn-primary save-btn form-control" %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="profile-pic">
|
2018-08-29 15:58:21 +00:00
|
|
|
<% if @user.photo.url.nil? %>
|
2018-08-29 13:53:39 +00:00
|
|
|
<%= image_tag "https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png"%>
|
|
|
|
<% else %>
|
|
|
|
<%= cl_image_tag current_user.photo%>
|
|
|
|
<% end %>
|
|
|
|
|
2018-08-29 15:58:21 +00:00
|
|
|
<%#= t.input_field :photo, onchange: 'this.form.submit();' %>
|
|
|
|
<%#= t.input_field :photo, as: :hidden %>
|
2018-08-29 13:53:39 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|