|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
= form_for @event, url: (@moderation ? moderation_path(@moderation) : @event.persisted? ? event_path(@event) : nil) do |f|
|
|
|
|
|
- if @event.persisted?
|
|
|
|
|
= form_for @event,
|
|
|
|
|
url: { action: @event.new_record? ? :create : :update } do |f|
|
|
|
|
|
- if @event.persisted?
|
|
|
|
|
= f.hidden_field :lock_version
|
|
|
|
|
- unless @moderation
|
|
|
|
|
= hidden_field_tag :secret, params[:secret]
|
|
|
|
@ -30,7 +31,10 @@
|
|
|
|
|
:markdown
|
|
|
|
|
#{t '.address_helper'}
|
|
|
|
|
= f.label :address
|
|
|
|
|
= f.text_field :address
|
|
|
|
|
= f.text_field :address, list: :addresses
|
|
|
|
|
%datalist#addresses
|
|
|
|
|
- Event.group(:address).order('count(address) desc').pluck(:address).each do |address|
|
|
|
|
|
%option= address
|
|
|
|
|
.field.city
|
|
|
|
|
= f.label :city
|
|
|
|
|
= f.text_field :city, required: true, list: :cities
|
|
|
|
@ -40,11 +44,13 @@
|
|
|
|
|
.field.region
|
|
|
|
|
= f.label :region
|
|
|
|
|
= f.select :region,
|
|
|
|
|
options_from_collection_for_select(Region.all, 'id', 'name', @event.region)
|
|
|
|
|
options_from_collection_for_select(Region.all, 'id', 'name',
|
|
|
|
|
@event.region)
|
|
|
|
|
.field.locality
|
|
|
|
|
= f.label :locality
|
|
|
|
|
= f.select :locality,
|
|
|
|
|
options_for_select([[t('attributes.locality_0'), 0], [t('attributes.locality_1'), 1]], @event.locality)
|
|
|
|
|
options_for_select([[t('attributes.locality_0'), 0],
|
|
|
|
|
[t('attributes.locality_1'), 1]], @event.locality)
|
|
|
|
|
|
|
|
|
|
.field.url
|
|
|
|
|
.helper
|
|
|
|
@ -74,8 +80,8 @@
|
|
|
|
|
.actions
|
|
|
|
|
= f.button formaction: :preview do
|
|
|
|
|
%em.fa.fa-eye
|
|
|
|
|
=t '.visualise'
|
|
|
|
|
= t '.visualise'
|
|
|
|
|
|
|
|
|
|
= f.button do
|
|
|
|
|
%em.fa.fa-check
|
|
|
|
|
=t '.save'
|
|
|
|
|
= t '.save'
|
|
|
|
|