{% extends "./template.html" %}
{% block content %}
{% load static %}
    <div class="card mt-4">
        <div class="card-header">
            <h2>Bug Client Information</h2>
        </div>
        <div class="card-body">
            <form action={% url 'bug_client_information' bug_client_id %} method="post" class="bug_client_information" id="input-form">
                {% csrf_token %}
                {% if form_errors %}
                    <div class="alert alert-danger">{{ form_errors }}</div>
                {% endif %}
                <div class="form-group">
                    <label for="id_bug_client_name">Bug Client Name</label>
                    {{ bug_client_form.bug_client_name }}
                </div>
                <div class="form-group">
                    <label for="id_list_of_bug_client">List of Bug Clients</label>
                    {{ bug_client_form.list_of_bug_client }}
                </div>
                <div class="form-group">
                    <label for="id_bug_client_url">Bug Client URL</label>
                    {{ bug_client_form.bug_client_url }}
                </div>

                Please note: NearBeach checks the connection of the bug client by;
                <ol>
                    <li>Connecting to the bug client</li>
                    <li>Extracts a list of open bugs</li>
                    <li>Converts the JSON into data</li>
                </ol>
                This may take some time due to connection speeds etc.

                <div class="form-row">
                    <input type="submit" value="Update Bug Client" class="btn btn-primary form-control col-md-6">
                    <a href="{% url 'bug_client_list' %}" class="btn btn-danger form-control col-md-6">Cancel</a>
                </div>

            </form>
        </div>
    </div>


{% endblock %}