ensl.org/app/views/maps/_form.html.erb
Luke Barratt 8020b06f45 Updates to matches page
Tweaked layout for contest page
Various styling updates
2014-04-21 19:19:03 +01:00

28 lines
845 B
Text

<%= form_for @map, html: { multipart: true, class: 'square' } do |f| %>
<%= render 'shared/errors', messages: @map.errors.full_messages %>
<div class="fields horizontal">
<%= f.label :name %>
<%= f.text_field :name %>
</div>
<div class="fields horizontal">
<%= f.label :category_id %>
<%= f.select :category_id, Category.ordered.domain(Category::DOMAIN_GAMES).collect { |c| [c, c.id] } %>
</div>
<div class="fields horizontal">
<%= f.label :download %>
<%= f.text_field :download %>
</div>
<div class="fields horizontal">
<%= f.label :picture %>
<div class="inputs">
<% if @map.picture.length > 0 %>
<%= image_tag @map.picture %><br>
<% end %>
<%= f.file_field :picture %>
</div>
</div>
<div class="controls">
<%= f.submit 'Update Map' %>
</div>
<% end %>