{% extends "packages/package_base.html" %} {% block title %} {% if package %} {{ _("Edit - %(title)s", title=package.title) }} {% if not package and author != current_user %} for {{ author.display_name }} {% endif %} {% else %} {{ _("Create Package") }} {% endif %} {% endblock %} {% from "macros/forms.html" import render_field, render_field_prefix_button, render_submit_field, form_scripts, render_multiselect_field, package_lists %} {% block scriptextra %} {{ form_scripts() }} {% if enable_wizard %} {% endif %} {% endblock %} {% block content %} {% if package %}

{{ _("Edit Details") }}

{% else %}

{{ _("Create Package") }} {% if author != current_user %} for {{ author.display_name }} {% endif %}

{% endif %} {% if not package %}
{{ _("View") }} {{ _("Have you read the Package Inclusion Policy and Guidance yet?") }}
{% else %}
{{ _("Read more") }} {{ _("You can include a .cdb.json file in your %(type)s to update these details automatically.", type=package.type.text.lower()) }}
{% endif %} {{ package_lists() }}
{{ form.hidden_tag() }}
{{ _("Package") }}
{{ render_field(form.type, class_="pkg_meta col-sm-2") }} {{ render_field(form.title, class_="pkg_meta col-sm-6") }} {% if package and package.approved and not package.checkPerm(current_user, "CHANGE_NAME") %} {{ render_field(form.name, class_="pkg_meta col-sm-4", readonly=True, hint=_("Please open a thread to request a name change")) }} {% else %} {{ render_field(form.name, class_="pkg_meta col-sm-4", pattern="[a-z0-9_]+", title=_("Lower case letters (a-z), digits (0-9), and underscores (_) only")) }} {% endif %}
{{ render_field(form.short_desc, class_="pkg_meta") }} {{ render_field(form.dev_state, class_="pkg_meta", hint=_("Please choose 'Work in Progress' if your package is unstable, and shouldn't be recommended to all players")) }} {{ render_multiselect_field(form.tags, class_="pkg_meta") }} {{ render_multiselect_field(form.content_warnings, class_="pkg_meta") }}
{{ render_field(form.license, class_="not_txp col-sm-6") }} {{ render_field(form.media_license, class_="col-sm-6") }}
{{ _("If there is no media, set the Media License to the same as the License.") }}
{{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }}
{{ _("Repository and Links") }}

{{ _("Enter the repo URL for the package. If the repo uses git then the metadata will be automatically imported.") }}

{{ _("Leave blank if you don't have a repo. Click skip if the import fails.") }}

{{ render_field(form.repo, class_="pkg_repo") }}
{{ _("Importing... (This may take a while)") }}
{{ render_field(form.website, class_="pkg_meta") }} {{ render_field(form.issueTracker, class_="pkg_meta") }} {{ render_field_prefix_button(form.forums, class_="pkg_meta", pattern="[0-9]+", prefix="forum.minetest.net/viewtopic.php?t=", placeholder=_("Tip: paste in a forum topic URL")) }} {{ render_field(form.video_url, class_="pkg_meta", hint=_("YouTube videos will be shown in an embed.")) }} {{ render_field(form.donate_url, class_="pkg_meta", hint=_("If blank, the author's donation URL will be used instead.")) }}
{{ render_submit_field(form.submit) }}
{% endblock %}