{% extends "base.html" %}
{% load static %}

{% block content %}

<div class="row">
  <div class="col-md-12 col-sm-12">

    <article>
      <h2> Submit Tutorial/Course </h2>

      {{submitform.errors}}

      <!-- Submit Form -->
      <form class="form-horizontal"
	    action="/submit" method="post">{% csrf_token %}
        <fieldset>
          <div class="form-group">
	    <!-- Title -->
            <div class="col-lg-12">
              <input type="text" class="form-control" name="title"
		     placeholder="Title">
            </div>
	  </div>

          <div class="form-group">	    
	    <!-- Url -->
            <div class="col-lg-12">
              <input type="text" class="form-control" name="url"
		     placeholder="Url">
            </div>
          </div>

          <div class="form-group">
	    <!-- Description -->
            <div class="col-lg-12">
              <textarea class="form-control" rows="3"
			name="body"
			placeholder="Description. 200-500 words."></textarea>
            </div>
          </div>

          <div class="form-group">	    
	    <!-- Url -->
            <div class="col-lg-12">
              <input type="text" class="form-control"
		     name="tags" placeholder="Tags (HTML, Python, Django)">
            </div>
          </div>

	  
          <div class="form-group">
	    

	    <!-- Description -->
            <div class="col-lg-3">
	      <select name="post_category" class="form-control">
		<option value="">Category</option>
		{% for category in categories %}
		<option value="{{category.slug}}">{{category.title}}</option>
		{% endfor %}	    
	      </select>
	    </div>
            <div class="col-lg-3">
	      {{submitform.post_type}}		
	    </div>
            <div class="col-lg-3">
	      {{submitform.post_level}}				
	    </div>
            <div class="col-lg-3">
	      {{submitform.post_price}}				
	    </div>
	    
	  </div>

	  <button type="submit"
		  class="btn btn-primary right">
	    Submit
	  </button>
	</fieldset>
      </form>
    </article>
  </div>
</div>  
{% endblock %}
