app/views/time_tables/_form.html.slim
= simple_form_for [@workbench, @referential, @time_table], html: {class: 'form-horizontal', id: 'timetable_form'}, wrapper: :horizontal_form do |form|
.row
.col-lg-12
= form.input :comment, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.time_table.comment")}
- if @time_table.new_record? && !@time_table.created_from
= form.input :calendar_id,
as: :ajax_select,
collection: [],
input_html: { 'data-url': calendars_workbench_autocomplete_index_path(@referential.workbench) }
- if @time_table.created_from
= form.input :created_from, disabled: true, input_html: { value: @time_table.created_from.comment }
.hidden = form.input :created_from_id, as: :hidden
= cancel_button
= form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'timetable_form'