af83/chouette-core

View on GitHub
app/views/exports/options/_period.html.slim

Summary

Maintainability
Test Coverage

= form.input :period, as: :radio_buttons, required: true, wrapper: :vertical_radio_and_checkboxes_tailwind, input_html: { 'x-model': 'period' }
div[x-bind:class="{ 'opacity-50': period == 'all_periods' || period == 'static_day_period' }" ]
  = form.input :duration, legend_tag: false, input_html: { 'x-bind:disabled': "period == 'all_periods' || period == 'static_day_period'", 'x-model': 'duration' }
div[x-bind:class="{ 'opacity-50': period == 'all_periods' || period == 'only_next_days' }" ]
  = form.input :from, as: :date_picker, input_html: { 'x-bind:disabled': "period == 'all_periods' || period == 'only_next_days'", 'x-model': 'from' }
  = form.input :to, as: :date_picker, input_html: { 'x-bind:disabled': "period == 'all_periods' || period == 'only_next_days'", 'x-model': 'to' }