{% extends "atlas/base.html" %}
{% load crispy_forms_tags %}

{% block content %}
<h2>{% if is_create %}Create Research Study{% else %}Update Research Study{% endif %}</h2>
<p class="text-muted">Configure randomisation and participant intake options. Packets are added on the study detail page.</p>

<form method="post" class="card card-body bg-dark border-secondary">
    {% csrf_token %}
    {{ form|crispy }}
    <div class="mt-3 d-flex gap-2">
        <button class="btn btn-primary" type="submit">Save</button>
        <a class="btn btn-outline-secondary" href="{% if study %}{% url 'atlas:research_study_detail' study.pk %}{% else %}{% url 'atlas:research_study_list' %}{% endif %}">Cancel</a>
    </div>
</form>
{% endblock %}
