{% extends 'modal_base.html' %}
{% load i18n %}

{% block title %}
    {% if object.pk %}
	    {% trans 'Edit Photostory' %}
    {% else %}
        {% trans 'New Photostory' %}
    {% endif %}
{% endblock %}

{% block body %}
    <form action="{% if photostory.pk %}{{ photostory.get_edit_url }}{% else %}{{ create_url }}{% endif %}"
          method="post" id="photostory-form">{% csrf_token %}
        <div class="modal-body">
            {% include 'extras/form.html' with display='block' %}
        </div>
        <div class="modal-footer clearfix">
            <button type="button" class="btn my-btn btn-default pull-left" data-dismiss="modal">{% trans 'Cancel' %}</button>
            <input class="btn my-btn my-btn-purple pull-right" type="submit" value="{% trans 'Confirm' %}" />
        </div>
    </form>
    <script type="text/javascript">
        $('#photostory-form').autoAjaxForm();
    </script>
{% endblock %}
