{% extends 'buybackprogram/page.html' %}
{% load i18n %}
{% load humanize %}
{% load bootstrap %}
{% load static %}

{% block body %}
<div class="card">
  <h5 class="card-header">{% trans "Add Special Marketgroup Tax to Program" %}</h5>
  <div class="card-body">
    {% if perms.buybackprogram.manage_programs and program.owner.user == request.user %}
      <form class="form" action="{% url 'buybackprogram:program_edit_marketgroup' program_pk=program.id %}" method="POST">
      {% csrf_token %}
      {{ form|bootstrap }}
      <button type="submit" class="btn btn-primary">{% trans "Add market group" %}</button>
    </form>
    {% endif %}
  </div>
  <div class="card-footer text-muted">
    <a class="btn btn-default navbar-btn btn-warning" href="{% url 'buybackprogram:program_special_taxes' program_pk=program.id %}"><i class="fas fa-long-arrow-alt-left"></i> {% trans "Back to item taxes" %}</a>
  </div>
</div>
{% endblock %}

{% block extra_javascript %}
<script type="text/javascript" src="{% static 'buybackprogram/js/bootstrap-autocomplete.min.js' %}"></script>
<script type="text/javascript" src="{% static 'buybackprogram/js/autocomplete.js' %}"></script>
{% endblock %}

{% block extra_css %}
{% include "buybackprogram/bundles/buybackprogram-css-light.html" %}
{% endblock %}

{% block extra_script %}
{% endblock %}
