summaryrefslogtreecommitdiff
path: root/app/views/gyms/new.html.erb
blob: f6e1b641e496b7526755bc59720e63782c6d03fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<% content_for(:title) do %>
  <%= t(".title") %>
<% end %>

<div class="container">
  <div class="columns">
    <div class="column is-12">
      <h1 class="title"><%= t(".title") %></h1>
      <%= form_for(@gym) do |form| %>
        <%= form.label :name, class: 'label' %>
        <%= form.text_field :name, class: 'input' %>
        <%= form.fields_for :location do |location_form| %>
          <%= location_form.label :address, class: 'label' %>
          <%= location_form.text_field :address, class: 'input' %>
          <%= location_form.label :city, class: 'label' %>
          <%= location_form.text_field :city, class: 'input' %>
          <%= location_form.label :region, class: 'label' %>
          <%= location_form.text_field :region, class: 'input' %>
          <%= location_form.label :country, class: 'label' %>
          <p class="control">
            <span class+'select is-large'>
              <%= location_form.select :country, @countries %>
            </span>
          </p>
          <%= location_form.label :postal_code, class: 'label' %>
          <%= location_form.text_field :postal_code, class: 'input' %>
        <% end %>
        <p class="control">
          <%= form.submit t(:save), class: 'button is-primary is-fullwidth' %>
        </p>
      <% end %>
    </div>
  </div>
</div>