<% content_for :js do %> <%= javascript_include_tag 'views/avaliation_recovery_diary_records/form' %> <% end %> <%= simple_form_for @avaliation_recovery_diary_record, html: { class: 'smart-form' } do |f| %> <%= f.error_notification %> <%= f.simple_fields_for :recovery_diary_record, @avaliation_recovery_diary_record.recovery_diary_record.localized do |recovery_diary_record| %> <%= recovery_diary_record.hidden_field :id %>
<%= recovery_diary_record.association :unity, as: :select2_unity, user: current_user %>
<% if current_user.current_role_is_admin_or_employee? %> <%= recovery_diary_record.association :classroom, as: :select2_classroom, user: current_user, record: f.object %> <% else %> <%= recovery_diary_record.association :classroom, as: :select2, elements: @classrooms, user: current_user, record: f.object %> <% end %>
<% if current_user.current_role_is_admin_or_employee? %> <%= recovery_diary_record.association :discipline, as: :select2_discipline, user: current_user, record: f.object, classroom_id: @avaliation_recovery_diary_record.recovery_diary_record.classroom_id %> <% else %> <%= recovery_diary_record.association :discipline, as: :select2, elements: @disciplines, user: current_user, record: f.object, classroom_id: @avaliation_recovery_diary_record.recovery_diary_record.classroom_id %> <% end %>
<%= f.association :avaliation, as: :select2, elements: [], readonly: f.object.persisted? %>
<%= recovery_diary_record.input :recorded_at, as: :date %>
<%= t('.students') %> <% if recovery_diary_record.object.errors.added? :students, :at_least_one_assigned_student %>
<%= recovery_diary_record.object.errors[:students].first %>
<% end %> <% sequence = 0 %> <%= recovery_diary_record.fields_for :students, @normal_students do |student| %> <% sequence += 1 %> <%= render 'student_fields', f: student, sequence: sequence %> <% end %> <% sequence = 0 %> <% if @dependence_students && @dependence_students.any? %> <%= recovery_diary_record.fields_for :students, @dependence_students do |student| %> <% sequence += 1 %> <%= render 'student_fields', f: student, sequence: sequence %> <% end %> <% end %> <% if @any_inactive_student %> <% end %> <% if @any_student_exempted_from_discipline %> <% end %>
Sequencial <%= RecoveryDiaryRecordStudent.human_attribute_name :student %> <%= t('.note') %> <%= t('.avaliation_recovery') %>
<%= t('.no_item_found') %>
<%= t('.dependence_students_legend') %>
<%= t('.inactive_students_legend') %>
<%= t('.exempted_students_from_discipline_legend') %>
<%= t('.dependence_students_legend') %>
<%= t('.inactive_students_legend') %>
<%= t('.exempted_students_from_discipline_legend') %>
<% end %> <% end %>