{% extends 'classroom-manage/layout.html.twig' %}
{% block title %}{{'classroom.set_service'|trans}} - {{ parent() }}{% endblock %}
{% set side_nav = 'service' %}
{% do script(['app/js/classroom-manage/set-services/index.js']) %}

{% block main %}
<div class="panel panel-default" role="classroom-set-services">
  <div class="panel-heading">{{'classroom.set_service'|trans}}</div>
  <div class="panel-body">
    <form id="services-form" class="form-horizontal" method="post">
      {{ web_macro.flash_messages() }}
      <div class="form-group mb10">
        <label class="col-sm-2 control-label">{{'classroom.commitment_service_label'|trans}}</label>
        <div class="col-sm-8 form-control-static">
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block{% if 'event' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.activity_tips'|trans({'%name%':setting('classroom.name')|default('classroom'|trans)})}}"
          >
            {{setting("classroom.name")|default('classroom'|trans)}}{{'classroom.activiy'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="event" {% if 'event' in classroom.service %} checked='checked'{% endif %}>
          </a>
          
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block {% if 'workAdvise' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.employ_guide_tips'|trans}}"
          >
            {{'classroom.employ_guide'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="workAdvise" {% if 'workAdvise' in classroom.service %} checked='checked'{% endif %}>
          </a>
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block{% if 'liveAnswer' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.one_to_one_answer_tips'|trans}}"
          >
            {{'classroom.one_to_one_answer'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="liveAnswer" {% if 'liveAnswer' in classroom.service %} checked='checked'{% endif %}>
          </a>
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block{% if 'teacherAnswer' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.answer_questions_tips'|trans}}"
          >
            {{'classroom.answer_questions'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="teacherAnswer" {% if 'teacherAnswer' in classroom.service %} checked='checked'{% endif %}>
          </a>
          
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block {% if 'testpaperReview' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.testpaper_review_tips'|trans}}"
          >
            {{'classroom.testpaper_review'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="testpaperReview" {% if 'testpaperReview' in classroom.service %} checked='checked'{% endif %}>
          </a>
          <a class="label label-md bg-primary-hover js-service-item mr10 mb20 inline-block {% if 'homeworkReview' in classroom.service %} label-primary {% else %} label-default {% endif %} " data-container="body" data-toggle="popover" data-trigger="hover" data-placement="top" data-content="{{'classroom.testpaper_review_tips'|trans}}"
          >
           {{'classroom.homework_review'|trans}}
            <input class="hidden" type="checkbox" name="service[]" value="homeworkReview" {% if 'homeworkReview' in classroom.service %}checked='checked'{% endif %}>
          </a>
        </div>
      </div>
      <div class="form-group">
        <div class="col-md-offset-2 col-md-8 controls">
          <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
          <button class="btn btn-fat btn-primary" type="submit">{{'form.btn.save'|trans}}</button>
        </div>
      </div>
      </div>  
    </form>
  </div>
</div>
{% endblock %}