aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/create.html
blob: 3fbba96997aae87ae25f1a9b5c7370f4ca0a2df2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends "wiki/base.html" %}
{% load sekizai_tags %}
{% load static %}
{% load wiki_tags %}

{% block wiki_pagetitle %}Add new article{% endblock %}

{% block wiki_contents %}
  {% addtoblock "js" %}
    <script type="text/javascript" src="{% static "admin/js/urlify.js" %}"></script>

    {% if not create_form.slug.value %}
      <script type="text/javascript" src="{% static "js/wiki/create.js" %}"></script>
    {% endif %}
  {% endaddtoblock %}

  {% include "wiki/includes/editormedia.html" %}
  <h1 class="page-header">Add new article</h1>

  <form method="POST" class="form-horizontal">
    {% wiki_form create_form %}

    <div class="field is-horizontal is-grouped">
      <div class="control">
        <a href="{% url 'wiki:get' path=parent_urlpath.path %}" class="button is-light">
          <span class="icon">
            <i class="fa fa-arrow-left"></i>
          </span>
          <span>Go back</span>
        </a>
      </div>
      <div class="control">
        <button type="submit" name="save_changes" class="button is-primary">
          <span class="icon">
            <i class="fa fa-plus"></i>
          </span>
          <span>Create Article</span>
        </button>
      </div>
    </div>
  </form>
{% endblock %}