oneclickorgs/one-click-orgs

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

Summary

Maintainability
Test Coverage
- content_for(:head) do
  = javascript_include_tag :general_meetings

%h2 Convene a General Meeting

.section
  = form_for(@general_meeting) do |general_meeting_form|

    %h3 Date & Time of Meeting

    %p= general_meeting_form.label :happened_on, "Date of meeting"
    %p.date_select= general_meeting_form.date_select :happened_on, {}, :class => 'inline datepicker'
    %p= general_meeting_form.label :start_time_proxy, "Start time"
    %p= general_meeting_form.time_select(:start_time_proxy, {:minute_step => 15}, {:class => 'inline'})

    %h3 Venue

    %p= general_meeting_form.text_area :venue

    %h3 Agenda

    %ol#agenda_items.agenda_items
      = general_meeting_form.fields_for(:agenda_items) do |agenda_item_fields|
        = render(:partial => 'agenda_item', :locals => {:agenda_item_fields => agenda_item_fields})
    %p
      %a{:id => 'add_agenda_item', 'data-association' => 'agenda_items', 'data-container' => 'agenda_items', :href => '#'} Add
    = new_child_fields_template(general_meeting_form, :agenda_items)

    %h3 Resolutions to be considered at the meeting

    .resolutions
      = general_meeting_form.fields_for :existing_resolutions, @draft_resolutions do |resolution_fields|
        = content_tag_for(:div, resolution_fields.object) do
          %p
            = resolution_fields.check_box :attached
            %strong
              = resolution_fields.label :attached, resolution_fields.object.title
          %p.sub
            = resolution_fields.check_box :open
            = resolution_fields.label :open, "Also open this resolution for electronic voting before the meeting."



    %h3 Certification
    %p
      = general_meeting_form.check_box :certification
      = general_meeting_form.label :certification, "I certify that the Board has decided (by meeting or written resolution) to convene this meeting."

    %p When you confirm these details, notice of the meeting will be sent to all Members.

    %p
      = general_meeting_form.submit "Confirm and convene the meeting"