{% extends "wagtailadmin/generic/create.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans with type=newsitem_opts.verbose_name %}Creating {{ type }}{% endblocktrans %}{% endblock %}

{% block extra_css %}
    {{ block.super }}
    {{ edit_handler.form.media.css }}
    {{ media.css }}
{% endblock %}

{% block bodyclass %}menu-news{% endblock %}


{% block content %}
<div class="w-sticky w-top-0 w-z-header">
    {% include "wagtailnews/slim_header.html" %}
    {% include "wagtailadmin/shared/side_panels.html" %}
</div>


{% trans "news post" as newspost_str %}
{% include "wagtailadmin/shared/header.html" with title=new_str subtitle=newspost_str icon="news" merged=True only %}

<form action="{{ action_url }}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data"{% endif %} data-edit-form>
    {% csrf_token %}

    <div class="nice-padding">
        {{ panel.render_form_content }}
    </div>
<footer class="footer">
    <ul>
        <li class="footer__container">
            <nav>
                <ul>
                    <li class="actions actions--primary">
                        <div class="dropdown dropup dropdown-button match-width">
                            <button
                                type="submit"
                                class="button action-save button-longrunning"
                                name="action-draft"
                                value="draft"
                                
                            >{% trans 'Save draft' %}</button>
                            <div class="dropdown-toggle">{% icon name="arrow-up" %}</div>
                            <ul>
                                <li>
                                    <button class="button" type="submit" name="action-publish" value="publish">{% trans 'Publish' %}</button>
                                </li>
                                {% block extra_actions %}
                                {% endblock %}
                            </ul>
                        </div>
                    </li>
                </ul>
            </nav>
        </li>
    </ul>
</footer>
{% endblock %}


{% block extra_js %}
    {{ block.super }}
    {% include "wagtailadmin/pages/_editor_js.html" %}
    {{ edit_handler.form.media.js }}
  	{{ media.js }}
{% endblock %}
