rubycentral/cfp-app

View on GitHub
app/views/staff/time_slots/_new_dialog.html.haml

Summary

Maintainability
Test Coverage
.modal-dialog
  .modal-content
    = simple_form_for [current_event, :staff, :schedule, time_slot], remote: true, html: {role: 'form'} do |f|
      .modal-header
        %h3 New Time Slot
        .errors
      .modal-body
        = render partial: 'staff/time_slots/form',
            locals: {f: f, time_slot: time_slot}
      .modal-footer
        %ul#form-flash.pull-left
          - flash.map do |key, value|
            %li{ class: "alert alert-#{key}"}= value

        %button.btn.btn-default{'data-dismiss' => "modal"} Cancel
        %button.btn.btn-primary{:type => "submit",
          name: 'button', value: 'save'} Save
        %button.btn.btn-primary{:type => "submit",
          name: 'button', value: 'save_and_add'} Save and Add