Source

indie-community / gamedb / templates / gamedb / game_form.html

{% extends "base.html" %}

{% block jquery %}
  $('#id_description').width(500);
  $('#id_storyline').width(500);
{% endblock %}

{% block content %}
          {% if game %}
          <form class="form-horizontal" action="{% url 'game_edit' game.slug %}" method="post">{% csrf_token %}
          {% else %}
          <form class="form-horizontal" action="{% url 'game_add' %}" method="post">{% csrf_token %}
          {% endif %}
            <fieldset>
              <legend>{% if game %}Update Game Details for {{game.title}}{% else %}Add Game to database{% endif %}</legend>
              {% if game %}
              <a class="btn btn-danger" href="{% url 'game_detail' game.slug %}">Cancel</a>
              {% endif %}
              {% include "bootstrap_form.html" %}
              <button type="submit" class="btn btn-primary">{% if game %}Save Game{% else %}Add Game{% endif %}</button>
            </fieldset>
          </form>
{% endblock %}