{% extends 'main.html' %}

<!-- context = {'form': form, 'bapSP': bapSP, 'club': club} -->

{% block content %}
<div class="container">
    <h3>{{ club.name }}</h3>
    <h4>Add New BAP Species Exception</h3>
    <h5><b>Species:</b> <a href="{% url 'species' bapSP.species.id %}">{{bapSP.species.name}}</a></h5>
    <div>
        <table>
            <form method="POST" enctype="multipart/form-data">
                {% csrf_token %}
                {{form.as_table}}
                <tr>
                    <td></td>
                    <td style="text-align: left; padding-top: 1em;">
                        <input type="Submit" style="border-style: solid; box-sizing: border-box; border-radius: 6px; padding: 4px 24px;" 
                            value="Save"></td>  
                </tr>
                <tr>
                    <td></td>
                    <td style="text-align:left; padding-top:1em;">
                        <button style="border-style:solid; box-sizing: border-box; border-radius: 6px; padding: 4px 24px;" 
                            onclick="window.location.href='{% url 'deleteBapSpecies' bapSP.id %}';" type="button">&nbsp;&nbsp;Delete&nbsp;&nbsp;</button>
                    </td>    
                </tr>                
            </form>
        </table>
    </div>
</div>
{% endblock content %}