episode_form.html 852 Bytes
Newer Older
fred's avatar
fred committed
1
{% extends "base.html" %}
2

3 4 5 6 7
{% block extrascripts %}
<script src="{{ STATIC_URL }}ckeditor/ckeditor/ckeditor.js">
</script>
{% endblock %}

8
{% block appbar %}
9
{% if episode.id %}
10 11
<h2>{{ episode.emission.title }} — {{ episode.title }}</h2>
<span><a href="../">Retourner à l'épisode</a></span>
12
{% else %}
13 14
<h2>{{ emission.title }} — Nouvel épisode</h2>
<span><a href="./">Retourner à l'émission</a></span>
15
{% endif %}
16 17 18 19
{% endblock %}


{% block content %}
20 21 22 23 24 25 26 27

    <form method="post">
      <div id="form-content">
        {% csrf_token %}
        <input type="hidden" name="id_emission" value="{{ emission.id }}"/>
        {{ form.as_p }}
      </div>
      {% block buttons %}
28 29 30 31 32
      {% if episode.id %}
      <button>Modifier</button>
      {% else %}
      <button>Ajouter</button>
      {% endif %}
33 34 35
      {% endblock %}
    </form>
{% endblock %}