af83/chouette-core

View on GitHub
app/views/exports/_form.html.slim

Summary

Maintainability
Test Coverage
- javascript_additional_packs 'exports/form'
= simple_form_for @export, as: :export, url: workbench_exports_path(workbench), html: {class: 'tailwind-form', id: 'wb_export_form', 'x-data': "exportForm(#{@export.alpine_state(true)})" }, wrapper: :horizontal_form_tailwind do |form|

  .row
    .col-lg-12
      = form.input :name

    .col-lg-12
      div
        = form.input :referential_id,
          as: :tom_select,
          collection: @referential_options,
          label_method: :name,
          input_html: { 'x-model': 'referentialId', class: "w-full" }

        = render 'exports/options', form: form, resource_type: :options, workgroup: @workbench.workgroup

    .col-lg-12
      = form.input :notification_target, collection: Export::Base.notification_target_options, selected: :user

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