aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/lines/_form.html.slim
blob: 993b2ed85e68869faeffe0031e185332493481ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
= simple_form_for [@line_referential, @line], html: {class: 'form-horizontal', id: 'lines_form'}, wrapper: :horizontal_form do |f|
  .row
    .col-lg-12
      = f.input :name
      = f.input :network_id, as: :select, :collection => @line_referential.networks, include_blank: false
      = f.input :company_id, as: :select, :collection => @line_referential.companies, include_blank: true
      = f.input :secondary_company_ids, :collection => @line_referential.companies, include_blank: false, input_html: { multiple: true, 'data-select2ed': true }, label: Chouette::Line.tmf(:secondary_companies)
      = f.input :published_name
      = f.input :registration_number
      = f.input :number
      = f.input :transport_mode, as: :select, collection: Chouette::Line.sorted_transport_modes, label: t('activerecord.attributes.compliance_control_blocks.transport_mode'), label_method: lambda {|t| ("<span>" + t("enumerize.transport_mode.#{t}") + "</span>").html_safe}, required: true, :include_blank => false
      = f.input :transport_submode, as: :select, collection: Chouette::Line.sorted_transport_submodes, label: t('activerecord.attributes.compliance_control_blocks.transport_submode'), label_method: lambda {|t| ("<span>" + t("enumerize.transport_submode.#{t}") + "</span>").html_safe}, :include_blank => true
      = f.input :color, as: :string
      = f.input :text_color
      = f.input :stable_id
      = f.input :url
      = f.input :seasonal
      = f.input :mobility_restricted_suitability, as: :select, :collection => [[@line.human_attribute_name("accessible"), true], [@line.human_attribute_name("not_accessible"), false]], :include_blank => true
      = f.input :flexible_service, as: :select, :collection => [[@line.human_attribute_name("on_demaond_fs"), true], [@line.human_attribute_name("regular_fs"), false]], :include_blank => true
      = f.input :comment
  .separator

  = f.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'lines_form'