clarion/lib/initfest/views/public/events/_form.slim

24 lines
1.9 KiB
Plaintext
Raw Normal View History

2015-08-15 08:52:41 +03:00
= simple_form_for @event, wrapper: :default do |form|
2024-10-20 17:02:08 +03:00
= form.input :event_type_id, as: :hidden, wrapper: false, disabled: :event_type.in?(@event.fields_editable_by_participant)
2015-08-15 08:52:41 +03:00
p
= form.error_notification
.form-inputs
2024-10-20 17:02:08 +03:00
= form.input :title, autofocus: true, disabled: !:title.in?(@event.fields_editable_by_participant)
= form.input :subtitle, disabled: !:subtitle.in?(@event.fields_editable_by_participant)
= form.association :track, wrapper: :default, collection: current_conference.tracks.map { |track| [track.name, track.id, {title: track.description}] }, disabled: !:track_id.in?(@event.fields_editable_by_participant)
= form.input :length, hint: t('simple_form.hints.event.length', type: @event.event_type.name.mb_chars.downcase, min: @event.event_type.minimum_length, max: @event.event_type.maximum_length), disabled: !:length.in?(@event.fields_editable_by_participant)
= form.input :language, as: :radio_buttons, collection: locale_collection, include_blank: false, wrapper: :default, disabled: !:language.in?(@event.fields_editable_by_participant)
= form.input :abstract, disabled: !:abstract.in?(@event.fields_editable_by_participant)
= form.input :description, disabled: !:description.in?(@event.fields_editable_by_participant)
= form.input :notes, disabled: !:notes.in?(@event.fields_editable_by_participant)
.input
= link_to @event.resources_bundle.filename, rails_blob_url(@event.resources_bundle.blob, disposition: "attachment") if @event.resources_bundle.attached?
= form.hidden_field :resources_bundle, value:@event.resources_bundle.signed_id if @event.resources_bundle.attached?
= form.input :resources_bundle, as: :file, wrapper: false, input_html: {direct_upload: true}, disabled: !:resources_bundle.in?(@event.fields_editable_by_participant)
2015-08-15 08:52:41 +03:00
= form.input :agreement, as: :boolean, wrapper: :default
= form.button :submit