{% extends "base.html" %} {% block title %} {% if collection %} {{ _("Edit") }} - {{ collection.title }} {% else %} {{ _("New Collection") }} {% endif %} {% endblock %} {% block scriptextra %} {% endblock %} {% block content %} {% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field, render_field_prefix_button %}
{{ render_submit_field(form.submit, class_="btn btn-primary float-right") }}

{{ self.title() }}

{{ form.hidden_tag() }}
{{ render_field(form.title, class_="col-sm-6") }} {% if form.name %} {{ render_field_prefix_button(form.name, class_="col-sm-6", pattern="[a-z0-9_]+", prefix="/collections/" + collection.author.username + "/", hint=_("Users won't be redirected when going to the old URL")) }} {% endif %}
{{ render_field(form.short_description) }} {{ render_checkbox_field(form.private, class_="my-3") }} {% if collection %} {{ render_field(form.long_description, fieldclass="form-control markdown") }} {% endif %} {% if collection and collection.items %}

{{ _("Packages") }}

{% for item in collection.items %} {% set package = item.package %} {% endfor %}
{% endif %}
{{ render_submit_field(form.submit) }}
{{ _("Are you sure you want to remove {title}?") }}
{% endblock %}