<% content_for :js do %> <%= javascript_include_tag 'views/knowledge_area_teaching_plans/copy' %> <% end %>
<%= simple_form_for @copy_knowledge_area_teaching_plan, url: :copy_knowledge_area_teaching_plans, html: { class: 'smart-form', id: 'copy_knowledge_area_teaching_plan' } do |f| %> <%= f.error_notification %> <%= render 'base_errors', f: f %>
Importante o plano de ensino por área de conhecimento só será replicado para escolas de destino que possuírem turmas com vínculo a área de conhecimento de origem e vínculo a uma das séries de destino.
<%= f.simple_fields_for :teaching_plan, @knowledge_area_teaching_plan.teaching_plan do |teaching_plan_form| %>
<%= teaching_plan_form.input :year, readonly: true, required: false %>
<%= teaching_plan_form.association :unity, as: :select2, elements: Unity.to_select, required: false, readonly: true %>
<%= teaching_plan_form.association :grade, as: :select2, elements: Grade.to_select, required: false, readonly: true %>
<%= f.simple_fields_for :teaching_plan, @knowledge_area_teaching_plan do |form| %> <%= form.input :knowledge_area_ids, as: :select2, elements: @knowledge_areas, multiple: true, input_html: { data: { without_json_parser: true } }, readonly: true %> <% end %>
<%= teaching_plan_form.association :school_term_type, as: :select2, required: false, elements: SchoolTermType.to_select2( current_user.current_school_year, current_user.current_unity_id, add_empty_element: false ).to_json, input_html: { value: teaching_plan_form.object.school_term_type_id, data: { without_json_parser: true } }, readonly: true %>
<%= teaching_plan_form.association :school_term_type_step, as: :select2, required: false, elements: SchoolTermTypeStep.to_select2( current_user.current_school_year, current_user.current_unity_id ).to_json, input_html: { value: teaching_plan_form.object.school_term_type_step_id, data: { without_json_parser: true } }, readonly: true %>
<%= f.simple_fields_for :teaching_plan, @knowledge_area_teaching_plan do |form| %> <%= form.input :experience_fields, readonly: true %> <% end %>
<%= f.hidden_field :id, value: @knowledge_area_teaching_plan.id %>
Copiar para:
<%= f.input :year, required: true, input_html: { value: teaching_plan_form.object.year } %>
Selecionar tudo <%= f.input :unities_ids, as: :select2, required: true, multiple: true, hide_empty_element: true, elements: Unity.to_select, input_html: { data: { without_json_parser: true } } %>
Selecionar tudo <%= f.input :grades_ids, as: :select2, required: true, multiple: true, hide_empty_element: true, elements: Grade.to_select, input_html: { data: { without_json_parser: true } } %>
<% end %> <% end %>