saasbook/esaas-engagements

View on GitHub
app/views/engagements/_form.html.haml

Summary

Maintainability
Test Coverage
= form_errors_for @engagement

= bootstrap_form_for([@app, @engagement], layout: :horizontal, label_col: "col-sm-3", control_col: "col-sm-9") do |f|
    .row
        %fieldset.col-md-6
            %legend Coaching Info
            = f.date_field :start_date, value: (@engagement.start_date || Time.now).strftime('%Y-%m-%d'), label: 'Start Date'
            = f.collection_select :coach_id, User.all, :id, :name, {label: 'Coach'}, {class: 'select2'}
        %fieldset.col-md-6
            %legend Team Info and Work Products
            = f.text_field :team_number, label: 'Team Number'
            = f.collection_select(:developer_ids, User.students, :id, :name, {include_blank: true, label: 'Student Names'}, {multiple: true, class: 'select2'})
            = f.url_field :screencast_url, label: 'Screencast Url'
            = f.url_field :screenshot_url, label: 'Screenshot Url'
            = f.url_field :poster_url, label: 'Poster Url'
            = f.url_field :presentation_url, label: 'Presentation Url'
            = f.url_field :prototype_deployment_url, label: 'Prototype Deployment Url'
            = f.url_field :repository_url, label: 'Repository Url'
            = f.text_area :features, label: 'Features'
        = f.submit class: 'btn btn-success'
        = button_tag 'Reset', type: :reset, :class => 'btn btn-primary'
        = link_to 'Back', @app, :class => 'btn btn-primary'