{% extends 'base.html' %}

{% block content %}
<div class="container mt-5">
    <h1>{% if object %}Edit Opportunity{% else %}Create Opportunity{% endif %}</h1>
    <form method="post">
        {% csrf_token %}
        <div class="mb-3">
            <label for="id_name" class="form-label">Name</label>
            {{ form.name }}
        </div>
        <div class="mb-3">
            <label for="id_lead" class="form-label">Lead</label>
            {{ form.lead }}
        </div>
        <div class="mb-3">
            <label for="id_value" class="form-label">Value</label>
            {{ form.value }}
        </div>
        <div class="mb-3">
            <label for="id_stage" class="form-label">Stage</label>
            {{ form.stage }}
        </div>
        <div class="mb-3">
            <label for="id_probability" class="form-label">Probability</label>
            {{ form.probability }}
        </div>
        <div class="mb-3">
            <label for="id_close_date" class="form-label">Close Date</label>
            {{ form.close_date }}
        </div>
        <button type="submit" class="btn btn-primary">{% if object %}Update{% else %}Create{% endif %}</button>
    </form>
</div>
{% endblock %}
