{% extends "admin/change_form.html" %}
{% load i18n l10n admin_urls static %}

{% block extrahead %}
    {{ block.super }}
    {{ media }}
    {{ form.media }}
    {#    <script type="text/javascript" src="{% static 'admin/js/cancel.js' %}"></script>#}
{% endblock %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} asign-to-user {% endblock %}

{% block content %}

    <h2>{% translate "Execute command"|capfirst %}</h2>

    <table class="table">
        <tr>
            <th>{% translate "Command" %}</th>
            <td>{{ command.name }}</td>
        </tr>
        <tr>
            <th>{% translate "Description" %}</th>
            <td>{{ command.help|linebreaksbr }}</td>
        </tr>
        <tr>
            <th>{% translate "Default Arguments" %}</th>
            <td>{{ command.default_args }}</td>
        </tr>
        <tr>
            <th>{% trans 'Help' %}</th>
            <td>{{ command.print_help|linebreaksbr }}</td>
        </tr>
    </table>

    <div class="col-sm-12" style="margin-top: 5px;">
        <div id="content-main">
            <form method="post" action="{% url 'admin:admin_commands_execute_command' command.pk %}"
                  class="form-horizontal">
                {% csrf_token %}
                <div class="form-controls">
                    {{ form }}
                </div>
                <div class="submit-row">
                    <a href="#" onclick="window.history.back()"
                       class="">{% translate "Back" %}</a>

                    <input type="submit" value="{% translate " Execute" %}" class="btn btn-primary mt-2">

                </div>

            </form>
        </div>
    </div>
{% endblock %}
