<!-- a lot of stuff-->

<!doctype html>
{% load static %}
<html lang="en"">
<head>
    <title>Contract Detail</title>
    <link href="{% static 'financial/css/material-dashboard.css' %}" rel="stylesheet" >
    <link rel="icon" type="image/xicon" href="{% static 'public/img/logo.png' %}">
<body class="g-sidenav-show bg-gray-200" >
    
    <main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg">
        
    {% if is_new %}    
    <h1>New Contract</h1>
    <form method="post" action='{% url "new_contract" %}' >
        {% csrf_token %}
        {{ form }}
        <button type=""button" value="submit">Create</button>
    </form>

    {% else %}
    <h1> {{ contract.name }}</h1>
    <form method="post" action='{% url "contract_detail" contract.slug %}' >
        {% csrf_token %}
        {{ form }}
        <button type=""button" value="submit">Update</button>
    </form>
    {% endif %}
    


    
    
    
    
    {% if is_new %}
    {% else %}
    <h2> Charge Numbers</h2>
    {% if charge_numbes %}
    <p> put charge number table here</p>
    <p> Create a new charge number</p>
    {{ charge_number_form }}
    {% else %}
    <p> There are no charge numbers for this contract</p>
    <form method="post" action='{% url "new_charge_number" %}' >
        {% csrf_token %}
        {{ charge_number_form }}
        <button type=""button" value="submit">Update</button>
    </form>
    {% endif %}
    {% endif %}
    

</body>
