{% extends "django_dagster/base.html" %}
{% load i18n %}

{% block content_title %}<h1>{{ title }}</h1>{% endblock %}

{% block dagster_breadcrumbs %}
&rsaquo; <a href="{% url 'admin:django_dagster_dagsterjob_changelist' %}">{% trans 'Jobs' %}</a>
&rsaquo; <a href="{% url 'admin:django_dagster_dagsterjob_change' job_name %}">{{ job_name }}</a>
&rsaquo; {% trans 'Trigger' %}
{% endblock %}

{% block dagster_content %}
<h2>{{ job_name }}</h2>

<form method="post">
    {% csrf_token %}

    <div class="form-row" style="margin-top: 15px;">
        <label for="id_run_config">Run config (JSON, optional):</label>
        <textarea id="id_run_config" name="run_config" rows="10"
                  style="width: 100%; font-family: monospace; font-size: 13px;"
                  placeholder='{"ops": {"my_op": {"config": {"param": "value"}}}}'>{{ run_config|default:'' }}</textarea>
    </div>

    <div class="submit-row" style="margin-top: 15px;">
        <input type="submit" value="{% trans 'Trigger Job' %}">
    </div>
</form>
{% endblock %}
