{% extends '::layout.html.twig' %}

{% block title %}
    Add event
{% endblock %}

{% block head %}
    <!-- Custom styles for login/register/contact/upload template -->
    <link href="{{ asset('css/forms.css') }}" rel="stylesheet">
{% endblock %}

{% block activeProfile %}
    class="active"
{% endblock %}

{% block content %}
    <div class="container">

      <form action="{{ path("add_event") }}" class="form-signin" role="form" id="add_event" method="POST">

        <h2 class="form-signin-heading">Add event form</h2>

          {{ form_widget(form.titleEng, { 'attr': {
          'id' : 'title_eng',
          'name' : 'title_eng',
          'class' : 'form-control',
          'placeholder' : 'Title of the event *',
          } }) }}

          {% if form_errors(form.titleEng) %}
              <div class="alert alert-danger">{{ form_errors(form.titleEng) }}</div>
          {% endif %}

          <!--<div style='text-align:right; margin-bottom: 15px;'><span style="font-size: 20px;"><i id="question_title_file" class="glyphicon glyphicon-question-sign"></i></span></div>-->

          {{ form_widget(form.organiser, { 'attr': {
          'id' : 'organiser',
          'name' : 'organiser',
          'class' : 'form-control',
          'placeholder' : 'Organiser of the event *',
          } }) }}

          {% if form_errors(form.organiser) %}
              <div class="alert alert-danger">{{ form_errors(form.organiser) }}</div>
          {% endif %}

          {{ form_widget(form.date, { 'attr': {
          'id' : 'date',
          'name' : 'date',
          'class' : 'form-control',
          'placeholder' : 'Date of the event *',
          } }) }}

          {% if form_errors(form.date) %}
              <div class="alert alert-danger">{{ form_errors(form.date) }}</div>
          {% endif %}

          {{ form_widget(form.date, { 'attr': {
          'id' : 'date',
          'name' : 'date',
          'class' : 'form-control',
          'placeholder' : 'Date of the event *',
          } }) }}

          {% if form_errors(form.date) %}
              <div class="alert alert-danger">{{ form_errors(form.date) }}</div>
          {% endif %}

          {{ form_widget(form.place, { 'attr': {
          'id' : 'place',
          'name' : 'place',
          'class' : 'form-control',
          'placeholder' : 'Place of the event *',
          } }) }}

          {% if form_errors(form.place) %}
              <div class="alert alert-danger">{{ form_errors(form.place) }}</div>
          {% endif %}

          {{ form_widget(form.description, { 'attr': {
          'id' : 'description',
          'name' : 'description',
          'class' : 'form-control',
          'placeholder' : 'Description of the event *',
          'rows' : 5,
          } }) }}

          {% if form_errors(form.description) %}
              <div class="alert alert-danger">{{ form_errors(form.description) }}</div>
          {% endif %}

          {{ form_widget(form.link, { 'attr': {
          'id' : 'link',
          'name' : 'link',
          'class' : 'form-control',
          'placeholder' : 'Link of the event',
          } }) }}

          {% if form_errors(form.link) %}
              <div class="alert alert-danger">{{ form_errors(form.link) }}</div>
          {% endif %}

        <button class="btn btn-lg btn-primary btn-block" type="submit">Add</button>

          {{ form_rest(form) }}
      </form>

        <div style="margin-bottom: 20px"></div>
        <center><span class="label label-warning">* Required fields.</span></center>

    </div> <!-- /container -->

{% endblock %}
