rubycentral/cfp-app

View on GitHub
app/views/admin/users/_form.html.haml

Summary

Maintainability
Test Coverage
= form_for [:admin, user] do |f|
  .row
    %fieldset.col-md-6
      %h2 User
      %p
      .form-group
        = f.label :name
        = f.text_field :name, class: 'form-control', placeholder: 'Name'
      .form-group
        = f.label :email
        = f.email_field :email, class: 'form-control', placeholder: 'Email address'
      %p
        = f.label :bio
        = f.text_area :bio, class: 'form-control', placeholder: 'Bio', rows: 8

    %fieldset.col-md-4
      %h2 User Logged In with
      %p
        - if user.provider.present?
          = user.provider.capitalize
        - else
          Email

  .row.col-md-12.form-submit
    .btn-toolbar
      = link_to "Cancel", admin_users_path, class: "button btn btn-danger pull-right"
      %button.pull-right.btn.btn-success{:type => "submit"} Save