{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %}

{% if user.is_authenticated %}
{% if request.user.groups.all.0.name == "company_owner" %}
{% comment %} {% with {{postingform.company}}={{company.id}} %} {% endcomment %}
<div class="container" style="top:50px; position:relative; ">

    <h1 >Job Post Submission</h1>

    <hr style="border: none; background-color: #333; color: #333; margin-bottom: 30px; height: 2px;">

    <form method="POST">
    {% csrf_token %}
        {{ postingform|crispy }}

        <button type="submit" class="btn btn-success btn-lg float-right ">Submit</button>

    </form>
{{ postingform.media.js }}

</div>

<!--    <div class = "col-md-8">-->
<!--<div class="content-section">-->
<!--    <form method="POST">-->
<!--        {% csrf_token %}-->
<!--        <fieldset class="form-group">-->
<!--            {{ pj_form|crispy }}-->
<!--        </fieldset>-->
<!--        <div class="form-group">-->
<!--            <button class="btn btn-outline-info" type="submit">Done</button>-->
<!--        </div>-->
<!--    </form>-->
<!--</div>-->
<!--    </div>-->
{% comment %} {% endwith %} {% endcomment %}
{% else %}
    <h1>You are not allowed to view this page. <br>
        This page is only for company owners</h1>

{% endif %}
{% endif %}
    


{% endblock %}