candychang/bernal-heights

View on GitHub
app/views/events/new.html.haml

Summary

Maintainability
Test Coverage
%div{:class => "container fixed-width"}
  .row
    %div{:class => "col-md-6"}
      %div{:class => "form-border panel"}
        %div{:class => "form-heading panel-heading"} New Event Form
        %div{:class => "panel-body"}
          = simple_form_for(@event, html: { class: '' }) do |event|
            = event.input :name, label: "Event Name", error: "A name for the event is required."
      
            = event.input :start_date, as: :date, label: "Start Date"
      
            = event.input :end_date, as: :date, label: 'End Date'
          
            = event.input :start_time, as: :time, label: "Start Time", ampm: true
            
            = event.input :end_time, as: :time, label: "End Time", ampm: true
            
            = event.input :location, as: :text, label: "Location", hint: "Please type an address or the street intersection, e.g. Andover St and Cortland Ave.", error: "A location is required."
            
            = event.input :description, as: :text, label: "Description"
            
            = event.input :creator_name, label: "Your Name", error: "Your name is required."
            
            = event.input :creator_email, label: "Your E-mail", error: "Your e-mail is required."
            
            = event.input :event_organizer, label: "Organizer Name"
            
            = event.submit 'Create Event', :class => 'btn btn-primary'