denny/ShinyCMS-ruby

View on GitHub
plugins/ShinyProfiles/app/views/shiny_profiles/admin/profiles/edit.html.erb

Summary

Maintainability
Test Coverage
<%= form_for @profile, url: shiny_profiles.admin_profile_path( @profile ), method: :put do |f| %>
  <p>
    <%= f.label :public_name %>
    <br><%= f.text_field :public_name %>
  </p>
  <p>
    <%= f.label :public_email %>
    <br><%= f.text_field :public_email %>
  </p>

  <p>
    <%= f.label :profile_pic %>
    <br><%= f.file_field :profile_pic %>
    <% if @profile.profile_pic.attached? %>
    <br><%= image_tag url_for( @profile.profile_pic.variant( resize: '200x200!' ) ), class: 'user_icon' %>
    <% end %>
  </p>

  <p>
    <%= f.label :bio %>
    <br><%= f.text_area :bio %>
  </p>

  <p>
    <%= f.label :location %>
    <br><%= f.text_field :location %>
  </p>
  <p>
    <%= f.label :postcode %>
    <br><%= f.text_field :postcode, class: 'textshort' %>
  </p>

  <p class="top-margin">
    <%= submit_tag t( 'update' ) %>
  </p>
<% end %>