1 {% extends "base.html" %}
4 {{ package.title or "Create Package" }}
5 {% if not package and author != current_user %}
6 for {{ author.display_name }}
10 {% from "macros/forms.html" import render_field, render_submit_field, form_scripts, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}
12 {% block scriptextra %}
14 {% if enable_wizard %}
15 <script src="/static/url.min.js"></script>
16 <script src="/static/polltask.js"></script>
17 <script src="/static/package_create.js?v=3"></script>
19 <script src="/static/package_edit.js?v=3"></script>
23 <h1>{{ _("Create Package") }}</h1>
25 <div class="alert alert-info">
26 <a class="float-right btn btn-sm btn-default" href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("View") }}</a>
28 {{ _("Have you read the Package Inclusion Policy and Guidance yet?") }}
31 {% if package and package.checkPerm(current_user, "REIMPORT_META") and package.releases.first() %}
32 <form class="alert alert-secondary mb-5" method="post" action="{{ package.getUpdateFromReleaseURL() }}">
33 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
34 <input class="btn btn-sm btn-warning float-right" type="submit" value="{{ _('Import') }}" />
36 <b>{{ _("Reimport meta from latest release.") }}</b>
37 {{ _("This will override 'provides', 'dependencies', and 'optional_dependencies'.") }}
38 <div style="clear:both;"></div>
43 <div class="alert alert-warning">
44 {{ _("Javascript is needed to improve the user interface, and is needed for features
45 such as finding metadata from git, and autocompletion.") }}<br />
46 {{ _("Whilst disabled Javascript may work, it is not officially supported.") }}
52 <form method="POST" action="" class="tableform">
53 {{ form.hidden_tag() }}
56 <legend>{{ _("Package") }}</legend>
59 {{ render_field(form.type, class_="pkg_meta col-sm-2") }}
60 {{ render_field(form.title, class_="pkg_meta col-sm-7") }}
61 {% if package and package.approved and not package.checkPerm(current_user, "CHANGE_NAME") %}
62 {{ render_field(form.name, class_="pkg_meta col-sm-3", readonly=True) }}
64 {{ render_field(form.name, class_="pkg_meta col-sm-3", pattern="[a-z0-9_]+", title=_("Lower case letters (a-z), digits (0-9), and underscores (_) only")) }}
67 {{ render_field(form.short_desc, class_="pkg_meta") }}
68 {{ render_multiselect_field(form.tags, class_="pkg_meta") }}
69 {{ render_multiselect_field(form.content_warnings, class_="pkg_meta") }}
70 <div class="pkg_meta row">
71 {{ render_field(form.license, class_="not_txp col-sm-6") }}
72 {{ render_field(form.media_license, class_="col-sm-6") }}
74 <div class="pkg_meta row">
75 <div class="not_txp col-sm-6"></div>
76 <div class="not_txp col-sm-6">{{ _("If there is no media, set the Media License to the same as the License.") }}</div>
78 {{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }}
81 <fieldset class="pkg_meta">
82 <legend class="not_txp">{{ _("Dependencies") }}</legend>
84 {{ render_mpackage_field(form.provides_str, class_="not_txp", placeholder="Comma separated list") }}
85 {{ render_deps_field(form.harddep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
86 {{ render_deps_field(form.softdep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
90 <legend class="pkg_meta">{{ _("Repository and Links") }}</legend>
92 <div class="pkg_wiz_1">
93 <p>{{ _("Enter the repo URL for the package.
94 If the repo uses git then the metadata will be automatically imported.") }}</p>
96 <p>{{ _("Leave blank if you don't have a repo. Click skip if the import fails.") }}</p>
99 {{ render_field(form.repo, class_="pkg_repo") }}
101 <div class="pkg_wiz_1">
102 <a id="pkg_wiz_1_next" class="btn btn-primary">{{ _("Next (Autoimport)") }}</a>
103 <a id="pkg_wiz_1_skip" class="btn btn-default">{{ _("Skip Autoimport") }}</a>
106 <div class="pkg_wiz_2">
107 {{ _("Importing... (This may take a while)") }}
110 {{ render_field(form.website, class_="pkg_meta") }}
111 {{ render_field(form.issueTracker, class_="pkg_meta") }}
112 {{ render_field(form.forums, class_="pkg_meta", placeholder=_("Tip: paste in a forum topic URL")) }}
115 <div class="pkg_meta">{{ render_submit_field(form.submit) }}</div>