{% load bootstrap3 %}
{% load django_markdown %}
{% bootstrap_css %}
{% bootstrap_javascript %}

<div class="container">

  {% include "qa/header.html" %}

  {% if message %}
  <strong>Enter a valid Question!</strong>
  {% endif %}

  {% if user.is_authenticated %}

  <form id="add_q" method="post" action="{% url 'qa:add' %}">
    {% csrf_token %}
    <input class="input-lg" style="width:100%" placeholder="Enter your question....." type="text" name="title"/> <br/><br/>
    <textarea id="ans" rows="7" style="width:100%" placeholder="Explain your question....." type="text" name="description"></textarea>
    {% markdown_editor "#ans" %}
    {% markdown_media %}
     <br/><br/>
    <input class="input-lg" style="width:100%" placeholder="Enter tags separates by comma!" type="text" name="tags"/> <br/><br/>
    <input type="hidden" value="{{ user.id }}" name="user" />
    <input class="btn pull-right btn-success" type="submit" value="Submit Question" />
  </form>
  <p>Note. Question cannot be empty!</p>
  {% else %}
  <small><a href="/login">Please Login to Add Questions!</a></small>
  {% endif %}

</div>

{% include "qa/footer.html" %}
