app/views/volunteer_ops/_form.html.erb
<%= form_for(@volunteer_op, url: submission_url, html: {method: action}) do |f| %>
<% if @volunteer_op.errors.any? %>
<div class= "text-danger", id="error_explanation">
<%= pluralize(@volunteer_op.errors.count, "error") %> prohibited this volunteer_op from being saved:
<ul>
<% @volunteer_op.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.label :title%>
<%= f.text_field :title, class: "form-control" %>
<%= f.label :description %>
<%= f.text_area :description, class: "form-control margin-bottom-10" %>
<%= f.label :address %>
<%= f.text_field :address, class: "form-control", placeholder: "#{@organisation.address}" %>
<%= f.label :postcode %>
<%= f.text_field :postcode, class: "form-control", placeholder: "#{@organisation.postcode}"%>
<%= f.label :role_description %>
<%= f.text_field :role_description, class: "form-control" %>
<%= f.label :when_volunteer_needed %>
<%= f.text_field :when_volunteer_needed, class: "form-control", 'data-behaviour' => 'date-only-picker', placeholder: 'dd/mm/yy' %>
<%= f.label :skills_needed %>
<%= f.text_area :skills_needed, class: "form-control margin-bottom-10" %>
<%= f.label :other_contact_details %>
<%= f.text_area :contact_details, class: "form-control" %>
<div class="checkbox-inline">
<%= f.check_box :post_to_doit, id: 'check_to_doit' ,disabled: !@can_publish_to_doit %>
<%= f.label :post_to_doit %>
</div>
<div id="doit_form">
<div class="form-group">
<%= f.label :doit_org_id, 'Doit organisation' %>
<div id="doit_org_list">
<i class="fa fa-spinner fa-spin fa-fw"></i>
</div>
</div>
<div class="form-group">
<%= f.label :advertise_start_date %>
<div class="input-group date">
<%= f.text_field :advertise_start_date, class: 'form-control', placeholder: 'yyyy-mm-dd', 'data-behaviour' => 'iso-date-picker' %>
</div>
</div>
<div class="form-group">
<%= f.label :advertise_end_date %>
<div class="input-group date">
<%= f.text_field :advertise_end_date, class: 'form-control', placeholder: 'yyyy-mm-dd', 'data-behaviour' => 'iso-date-picker' %>
</div>
</div>
</div>
<div class="actions" style="margin-top: 16px;">
<%= f.submit button_text(@volunteer_op), class: 'btn btn-primary' %>
</div>
<% end %>
<% render partial: 'shared/map_scripts', locals: {markers: markers} %>