byceps/byceps

View on GitHub
byceps/blueprints/admin/shop/article/templates/admin/shop/article/attachment_create_form.html

Summary

Maintainability
Test Coverage
{% extends 'layout/admin/shop/article.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% set current_page_shop = shop %}
{% set page_title = _('Attach article') %}

{% block before_body %}
{{ render_backlink(url_for('.view', article_id=article.id), article.item_number) }}
{%- endblock %}

{% block body %}

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

  <form action="{{ url_for('.attachment_create', article_id=article.id) }}" method="post">
    <div class="box">
      {{ form_field(form.article_to_attach_id, autofocus='autofocus') }}
      {{ form_field(form.quantity, type='number', min=1, max=999, style='width: 4em;') }}
    </div>

    {{ form_buttons(_('Attach article')) }}
  </form>

{%- endblock %}