Sha256: d5e67eeb728a17e0c0d31fca5729216a88c21747a2453019e2f76dc66c63744b

Contents?: true

Size: 1.99 KB

Versions: 7

Compression:

Stored size: 1.99 KB

Contents

<%= form_for(@location) do |f| -%>
  <%- if @location.errors.any? -%>
    <div id="error_explanation">
      <h2>Please correct the following errors:</h2>
      <%- @location.errors.to_a.in_groups(2, false).each do |group| -%>
      <ul>
        <%- group.each do |msg| -%>
        <li><%= msg -%></li>
        <%- end -%>
      </ul>
      <%- end -%>
      <br style="clear: both;" />
    </div>
    <br style="clear: both;" />
  <%- end -%>

  <fieldset class="form_container">
    <%= legend_tag 'About This Location' -%>
    <div class="form_column">
      <%= f.text_field :name -%>
      <%= f.check_box :active, :inline_label => 'Yes' -%>
    </div>

    <div class="form_column">
      <div id="map_canvas" style="border: solid black 1px; width: 100%; height: 200px"></div>
    </div>
  </fieldset>

  <fieldset class="form_container">
    <%= legend_tag 'Address' -%>
    <div class="form_column">
      <%= f.text_field :address1 -%>
      <%= f.text_field :address2 -%>
      <%= f.text_field :city -%>
      <%= f.text_field :state -%>
      <%= f.text_field :zip -%>
    </div>
    <div class="form_column">
      <%= f.text_field :phone -%>
      <%= f.text_field :fax -%>
      <%= f.text_field :email -%>
    </div>
  </fieldset>

  <fieldset class="form_container">
    <%= legend_tag 'Services Offered' -%>
    <%- i = 0 -%>
    <%- Service.all.to_a.in_groups(2, false) do |column| -%>
      <div class="form_column">
        <%- column.each do |service| -%>
          <fieldset>
            <%= check_box_tag 'location[service_ids][]', service.id, @location.services.include?(service), :id => "service_#{i}" -%>
            <%= service.name -%>
          </fieldset>
          <%- i += 1 -%>
        <%- end -%>
      </div>
    <%- end -%>
  </fieldset>

<%= f.submit 'Save', :class => 'button' -%>
  <%= link_to 'Cancel', @location, :class => 'button' -%>
<%- end -%>

<%= render :partial => 'shared/map', :locals => {:place => @location.locale} -%>

<script type="text/javascript">
  initializeMap();
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
campfire_logic-2.0.0 app/views/locations/_form.html.erb
campfire_logic-1.2.1 app/views/locations/_form.html.erb
campfire_logic-1.2.0 app/views/locations/_form.html.erb
campfire_logic-1.1.10 app/views/locations/_form.html.erb
campfire_logic-1.1.9 app/views/locations/_form.html.erb
campfire_logic-1.1.8 app/views/locations/_form.html.erb
campfire_logic-1.1.7 app/views/locations/_form.html.erb