dannyighsu/ucb-senior-map

View on GitHub
app/views/devise/registrations/edit.html.erb

Summary

Maintainability
Test Coverage
<div id='jumbotron-form'>
  <div class='center jumbotron'>
    <h2>Edit <%= resource_name.to_s.humanize %></h2>

    <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
      <%= devise_error_messages! %>

      <div class="field">
        <%= f.label :first_name %><br />
        <%= f.text_field :first_name, :placeholder=>current_user.first_name, autocomplete: "off" %>
      </div>

      <div class="field">
        <%= f.label :last_name %><br />
        <%= f.text_field :last_name, :placeholder=>current_user.last_name, autocomplete: "off" %>
      </div>

      <div class="field">
        <%= f.label :email %><br />
        <%= f.email_field :email, autofocus: true %>
      </div>

      <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
        <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
      <% end %>

      <div class="field" id='password'>
        <br />
        <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
        <%= f.password_field :password, autocomplete: "off" %>
      </div>

      <div class="field">
        <%= f.label :password_confirmation %><br />
        <%= f.password_field :password_confirmation, autocomplete: "off" %>
      </div>

      <div class="field">
        <%= f.label :organization, 'School or Company' %><br />
        <%= f.text_field :school,  autocomplete: "off", :placeholder=>current_user.school %>
      </div>

      <div class="field">
       <%= f.label :major, 'Major at Cal'%><br />
       <%= f.text_field :major,  autocomplete: "off", :placeholder=>current_user.major %>
     </div>

       <div class="field">
        <%= f.label :description, 'Cool thing about me' %><br />
        (100 words or less)<br />
        <%= f.text_area :description,  autocomplete: "off"%>
      </div>

       <div class="field">
        <%= f.label :location, 'Which city will you be after graduation?' %><br />
        <%= f.text_field :location,  autocomplete: "off", :placeholder=>current_user.location %>
      </div>

      <div class="field">
        <br />
        <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
        <%= f.password_field :current_password, autocomplete: "off" %>
      </div>

      <div class="actions button button-block">
        <%= f.submit "Update", id: "button" %>
      </div>
    <% end %>
  </div>
</div>