You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
4.7 KiB
99 lines
4.7 KiB
{% extends 'base.html' %}
|
|
{% load static %}
|
|
{# Displays article form #}
|
|
|
|
{% block scripts %}
|
|
|
|
<script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
|
|
{# selects #}
|
|
<link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/>
|
|
<script src="{% static 'js/select/select2.js' %}"></script>
|
|
<script src="{% static 'custom_js/make_select.js' %}"></script>
|
|
{# ajax #}
|
|
<script src="{% static 'custom_js/file_post_ajax.js' %}"></script>
|
|
<script src="{% static 'custom_js/select_tag.js' %}"></script>
|
|
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<form method="post" class="form-horizontal" name="form2" id="form2"enctype="multipart/form-data"> {% csrf_token %}
|
|
<fieldset>
|
|
<legend><i class="icon-edit"></i>{% if article %} Изменить {% else %} Добавить {% endif %}статью</legend>
|
|
|
|
<div class="box span8">
|
|
<div class="box-header well">
|
|
<h2><i class="icon-pencil"></i> Основная информация</h2>
|
|
</div>
|
|
<div class="box-content">
|
|
|
|
{# main_title #}
|
|
{% include 'admin/forms/multilang.html' with field='main_title' form=form languages=languages %}
|
|
|
|
{# theme #}
|
|
<div class="control-group {% if form.theme.errors %}error{% endif %}">
|
|
<label class="control-label"><b>{{ form.theme.label }}:</b></label>
|
|
<div class="controls">
|
|
{{ form.theme }}
|
|
<span class="help-inline">{{ form.theme.errors }}</span>
|
|
</div>
|
|
</div>
|
|
{# tag #}
|
|
<div class="control-group {% if form.tag.errors %}error{% endif %}">
|
|
<label class="control-label">{{ form.tag.label }}:</label>
|
|
<div class="controls">
|
|
{{ form.tag }}
|
|
<span class="help-inline">{{ form.tag.errors }}</span>
|
|
</div>
|
|
</div>
|
|
{# exposition #}
|
|
{% if form.exposition %}
|
|
<div class="control-group {% if form.exposition.errors %}error{% endif %}">
|
|
<label class="control-label">{{ form.exposition.label }}:</label>
|
|
<div class="controls">
|
|
{{ form.exposition }}
|
|
<span class="help-inline">{{ form.exposition.errors }}</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{# conference #}
|
|
{% if form.conference%}
|
|
<div class="control-group {% if form.conference.errors %}error{% endif %}">
|
|
<label class="control-label">{{ form.conference.label }}:</label>
|
|
<div class="controls">
|
|
{{ form.conference }}
|
|
<span class="help-inline">{{ form.conference.errors }}</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{# logo #}
|
|
<div class="control-group {% if form.logo.errors %}error{% endif %}">
|
|
<label class="control-label">{{ form.logo.label }}:</label>
|
|
<div class="controls">
|
|
{{ form.logo }}
|
|
{% if article.logo %}
|
|
|
|
<img src="{{ article.logo.url }}">
|
|
{% endif %}
|
|
<span class="help-inline">{{ form.logo.errors }}</span>
|
|
</div>
|
|
</div>
|
|
{# preview #}
|
|
{% include 'admin/forms/multilang.html' with field='preview' form=form languages=languages %}
|
|
{# description #}
|
|
{% include 'admin/forms/multilang.html' with field='description' form=form languages=languages %}
|
|
{# keywords #}
|
|
{% include 'admin/forms/multilang.html' with field='keywords' form=form languages=languages %}
|
|
{# title #}
|
|
{% include 'admin/forms/multilang.html' with field='title' form=form languages=languages %}
|
|
{# descriptions #}
|
|
{% include 'admin/forms/multilang.html' with field='descriptions' form=form languages=languages %}
|
|
</div>
|
|
</div>
|
|
<div class="controls">
|
|
|
|
<input class="btn btn-large btn-primary" type="submit" value="{% if article %}Изменить{% else %}Добавить{% endif %}">
|
|
<input class="btn btn-large" type="reset" value="Отмена">
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
{% endblock %} |