2015-02-28 17:28:05 +01:00
|
|
|
= form_for @orga do |f|
|
2015-07-25 18:32:27 +02:00
|
|
|
- if @orga.persisted?
|
|
|
|
= hidden_field_tag :secret, params[:secret]
|
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
- if @orga.errors.any?
|
2017-05-20 16:02:07 +02:00
|
|
|
#flash-messages
|
2015-02-28 17:28:05 +01:00
|
|
|
- @orga.errors.full_messages.each do |msg|
|
|
|
|
%p.flash.alert= msg
|
|
|
|
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.kind.required
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :kind
|
|
|
|
%span.radios
|
|
|
|
- Kind.all.each do |kind|
|
|
|
|
= f.radio_button :kind_id, kind.id
|
|
|
|
= f.label "kind_id_#{kind.id}" do
|
|
|
|
%em.fa{ class: "fa-#{kind.icon}" }
|
|
|
|
= Kind.human_attribute_name "name_#{kind.name}"
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.name.required
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :name
|
|
|
|
= f.text_field :name, required: true
|
2016-04-09 16:06:22 +02:00
|
|
|
.field.place_name
|
|
|
|
= f.label :place_name
|
|
|
|
= f.text_field :place_name
|
2017-05-22 16:42:21 +02:00
|
|
|
.helper
|
|
|
|
:markdown
|
2019-10-22 22:52:05 +02:00
|
|
|
#{t '.address_helper_html'}
|
2016-04-09 16:06:22 +02:00
|
|
|
.field.address
|
|
|
|
= f.label :address
|
|
|
|
= f.text_field :address
|
2015-02-28 17:28:05 +01:00
|
|
|
.field.city
|
|
|
|
= f.label :city
|
|
|
|
= f.text_field :city, list: :cities
|
|
|
|
%datalist#cities
|
2018-09-30 19:02:49 +02:00
|
|
|
- Event.group(:city).order('1 desc').count.each do |r|
|
|
|
|
%option= r[0]
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.region.required
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :region
|
2017-05-27 17:46:01 +02:00
|
|
|
= render partial: '/regions/selector', locals: { f: f }
|
2015-02-28 17:28:05 +01:00
|
|
|
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.description
|
|
|
|
= f.label :description
|
|
|
|
/= f.text_area :description, rows: 25, class: :description
|
|
|
|
= f.text_field :description, class: :description
|
|
|
|
|
2018-02-11 18:06:32 +01:00
|
|
|
.field.url.required{ title: t('.url_helper') }
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :url
|
2018-02-11 18:06:32 +01:00
|
|
|
= f.url_field :url, required: true, placeholder: 'Ex: https://april.org'
|
2016-01-07 22:20:09 +01:00
|
|
|
.field.diaspora
|
|
|
|
= f.label :diaspora
|
|
|
|
= f.url_field :diaspora
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.feed{ title: t('.feed_helper') }
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :feed
|
2017-10-14 21:39:56 +02:00
|
|
|
= f.url_field :feed, placeholder: 'Ex: https://april.org/index.rss'
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.contact{ title: t('.contact_helper') }
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :contact
|
|
|
|
= f.email_field :contact
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.submitter{ title: t('.submitter_helper') }
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.label :submitter
|
|
|
|
= f.email_field :submitter
|
2016-01-04 00:49:52 +01:00
|
|
|
|
2017-05-22 16:42:21 +02:00
|
|
|
.field.tags{ title: t('.tags_helper') }
|
2017-06-02 13:19:11 +02:00
|
|
|
= f.label :tags, for: 'orga_tag_list_tag'
|
2016-12-17 16:59:11 +01:00
|
|
|
= f.text_field :tag_list, value: f.object.tag_list.to_s
|
2016-01-04 00:49:52 +01:00
|
|
|
|
2015-12-26 23:32:04 +01:00
|
|
|
.field.active
|
|
|
|
= f.label :active
|
|
|
|
= f.check_box :active
|
2015-02-28 17:28:05 +01:00
|
|
|
|
|
|
|
.actions
|
2020-01-01 22:44:07 +01:00
|
|
|
= f.button formaction: :preview do
|
|
|
|
%em.fa.fa-eye
|
|
|
|
= t '.visualise'
|
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
= f.button do
|
|
|
|
%em.fa.fa-check
|
|
|
|
= t '.save'
|