{% extends "coop_cms/base.html" %}
{% load i18n djaloha_utils coop_edition %}

{% block meta_title %}
    {% article_title %}
{% endblock %}

{% block jquery_declaration %}
    {{ block.super }}
    {% if_cms_edition %}
        {% cms_form_media %}
    {% endif %}
{% endblock %}

{% block extra_head %}
{% if_cms_edition %}
<script>
$(function(){
    //move the form submit to the coop_bar
    $("form#cms_form input[type='submit']").hide();
    $('#coopbar_save').click(function(event) {
        $("form#cms_form").submit();    
        event.preventDefault();
    });
})
</script>

{% endif %}
{% endblock %}

{% block document %}

    {% block article %}
        {% include "coop_cms/_article_form.html" %}
        
        {% if_cms_edition %}
        {% include "coop_cms/_article_publication.html" %}
        {% endif %}
    
    {% endblock %}
{% endblock %}
