byceps/byceps

View on GitHub
byceps/blueprints/admin/gallery/templates/admin/gallery/gallery_create_form.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/base.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field_check, form_field %}
{% set current_page = 'gallery_admin' %}
{% set page_title = _('Add Gallery') %}

{% block before_body %}
{{ render_backlink(url_for('.gallery_index_for_brand', brand_id=brand.id), _('Galleries')) }}
{%- endblock %}

{% block body %}

  <h1 class="title">{{ page_title }}</h1>

  <form action="{{ url_for('.gallery_create', brand_id=brand.id) }}" method="post">
    <div class="box">
      {{ form_field(form.slug, placeholder='party-2023', autofocus=true) }}
      {{ form_field(form.title, placeholder='Party 2023') }}
      {{ form_field_check(form.hidden) }}
    </div>

    {{ form_buttons(_('Add')) }}
  </form>

{%- endblock %}