{% extends 'base.html' %}

{% block content %}
<div class="container">
    <h2 class="mb-4">{% if form.instance.pk %}Edit Contact{% else %}Add Contact{% endif %}</h2>
    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button type-="submit" class="btn btn-primary">Save</button>
        <a href="{% url 'index' %}" class="btn btn-secondary">Cancel</a>
    </form>
</div>
{% endblock %}
