<button class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#run-{{ task.name }}">
    Run
</button>
<a class="btn btn-secondary btn-sm" href="/result?task={{ task.name }}">Job</a>
<a class="btn btn-dark btn-sm" href="/job?task={{ task.name }}">Result</a>
<div class="modal fade" id="run-{{ task.name }}" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Run task {{ task.name }}</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"
                        aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="form-{{ task.name }}">
                    <div class="row">
                        <div class="col">
                            <div class="mb-3">
                                <label for="args-{{ task.name }}"
                                       class="col-form-label">Args:</label>
                                <input type="text" class="form-control" id="args-{{ task.name }}">
                            </div>
                        </div>
                        <div class="col">
                            <div class="mb-3">
                                <label for="kwargs-{{ task.name }}"
                                       class="col-form-label">Kwargs:</label>
                                <input type="text" class="form-control" id="kwargs-{{ task.name }}">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            <div class="mb-3">
                                <label for="job-id-{{ task.name }}"
                                       class="col-form-label">JobID:</label>
                                <input type="text" class="form-control" id="job-id-{{ task.name }}">
                            </div>
                        </div>
                        <div class="col">
                            <div class="mb-3">
                                <label for="countdown-{{ task.name }}"
                                       class="col-form-label">Countdown:</label>
                                <input type="text" class="form-control"
                                       id="countdown-{{ task.name }}">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            <div class="mb-3">
                                <label for="eta-{{ task.name }}" class="col-form-label">Eta:</label>
                                <input type="text" class="form-control" id="eta-{{ task.name }}">
                            </div>
                        </div>
                        <div class="col">
                            <div class="mb-3">
                                <label for="expires-{{ task.name }}"
                                       class="col-form-label">Expires:</label>
                                <input type="text" class="form-control"
                                       id="expires-{{ task.name }}">
                            </div>
                        </div>
                        <div class="col">
                            <div class="mb-3">
                                <label for="job-retry-{{ task.name }}"
                                       class="col-form-label">JobRetry:</label>
                                <input type="number" class="form-control"
                                       id="job-retry-{{ task.name }}">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close
                </button>
                <button type="button" class="btn btn-primary" onclick="run_task('{{ task.name }}')">
                    Run
                </button>
            </div>
        </div>
    </div>
</div>
