76 lines
2.1 KiB
Plaintext
76 lines
2.1 KiB
Plaintext
= form_for @orga do |f|
|
|
- if @orga.persisted?
|
|
= hidden_field_tag :secret, params[:secret]
|
|
|
|
- if @orga.errors.any?
|
|
#flash-messages
|
|
- @orga.errors.full_messages.each do |msg|
|
|
%p.flash.alert= msg
|
|
|
|
.field.kind.required
|
|
= 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}"
|
|
.field.name.required
|
|
= f.label :name
|
|
= f.text_field :name, required: true
|
|
.field.place_name
|
|
= f.label :place_name
|
|
= f.text_field :place_name
|
|
.helper
|
|
:markdown
|
|
#{raw t '.address_helper'}
|
|
.field.address
|
|
= f.label :address
|
|
= f.text_field :address
|
|
.field.city
|
|
= f.label :city
|
|
= f.text_field :city, list: :cities
|
|
%datalist#cities
|
|
- Event.group(:city).order('count(city) desc').pluck(:city).each do |city|
|
|
%option= city
|
|
.field.department
|
|
= f.label :department
|
|
= f.text_field :department
|
|
.field.region.required
|
|
= f.label :region
|
|
= render partial: '/regions/selector', locals: { f: f }
|
|
|
|
.field.description
|
|
= f.label :description
|
|
/= f.text_area :description, rows: 25, class: :description
|
|
= f.text_field :description, class: :description
|
|
|
|
.field.url.required{ title: t('.url_helper') }
|
|
= f.label :url
|
|
= f.url_field :url, required: true, placeholder: 'Ex: https://april.org'
|
|
.field.diaspora
|
|
= f.label :diaspora
|
|
= f.url_field :diaspora
|
|
.field.feed{ title: t('.feed_helper') }
|
|
= f.label :feed
|
|
= f.url_field :feed, placeholder: 'Ex: https://april.org/index.rss'
|
|
.field.contact{ title: t('.contact_helper') }
|
|
= f.label :contact
|
|
= f.email_field :contact
|
|
.field.submitter{ title: t('.submitter_helper') }
|
|
= f.label :submitter
|
|
= f.email_field :submitter
|
|
|
|
.field.tags{ title: t('.tags_helper') }
|
|
= f.label :tags, for: 'orga_tag_list_tag'
|
|
= f.text_field :tag_list, value: f.object.tag_list.to_s
|
|
|
|
.field.active
|
|
= f.label :active
|
|
= f.check_box :active
|
|
|
|
.actions
|
|
= f.button do
|
|
%em.fa.fa-check
|
|
= t '.save'
|