aboutsummaryrefslogtreecommitdiff
path: root/app/templates/packages/create_edit.html
blob: 9a115313e25e8143787061015e76647069b82d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{% extends "base.html" %}

{% block title %}
	{{ package.title or "Create Package" }}
	{% if not package and author != current_user %}
		for {{ author.display_name }}
	{% endif %}
{% endblock %}

{% from "macros/forms.html" import render_field, render_submit_field, form_scripts, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}

{% block scriptextra %}
	{{ form_scripts() }}
	{% if enable_wizard %}
		<script src="/static/url.min.js"></script>
		<script src="/static/polltask.js"></script>
		<script src="/static/package_create.js?v=3"></script>
	{% endif %}
	<script src="/static/package_edit.js?v=3"></script>
{% endblock %}

{% block content %}
	<h1>Create Package</h1>

	<div class="alert alert-info">
		<a class="float-right btn btn-sm btn-default" href="{{ url_for('flatpage', path='policy_and_guidance') }}">View</a>

		Have you read the Package Inclusion Policy and Guidance yet?
	</div>

	<noscript>
		<div class="alert alert-warning">
			Javascript is needed to improve the user interface, and is needed for features
			such as finding metadata from git, and autocompletion.<br />
			Whilst disabled Javascript may work, it is not officially supported.
		</div>
	</noscript>

	{{ package_lists() }}

	<form method="POST" action="" class="tableform">
		{{ form.hidden_tag() }}

		<fieldset>
			<legend>Package</legend>

			<div class="row">
			{{ render_field(form.type, class_="pkg_meta col-sm-2") }}
			{{ render_field(form.title, class_="pkg_meta col-sm-7") }}
			{{ render_field(form.name, class_="pkg_meta col-sm-3") }}
			</div>
			{{ render_field(form.short_desc, class_="pkg_meta") }}
			{{ render_multiselect_field(form.tags, class_="pkg_meta") }}
			<div class="pkg_meta row">
				{{ render_field(form.license, class_="not_txp col-sm-6") }}
				{{ render_field(form.media_license, class_="col-sm-6") }}
			</div>
			{{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }}
		</fieldset>

		<fieldset class="pkg_meta">
			<legend class="not_txp">Dependencies</legend>

			{{ render_mpackage_field(form.provides_str, class_="not_txp", placeholder="Comma separated list") }}
			{{ render_deps_field(form.harddep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
			{{ render_deps_field(form.softdep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
		</fieldset>

		<fieldset>
			<legend class="pkg_meta">Repository and Links</legend>

			<div class="pkg_wiz_1">
				<p>Enter the repo URL for the package.
				If the repo uses git then the metadata will be automatically imported.</p>

				<p>Leave blank if you don't have a repo. Click skip if the import fails.</p>
			</div>

			{{ render_field(form.repo, class_="pkg_repo") }}


			<div class="pkg_wiz_1">
				<a id="pkg_wiz_1_next" class="btn btn-primary">Next (Autoimport)</a>
				<a id="pkg_wiz_1_skip" class="btn btn-default">Skip Autoimport</a>
			</div>

			<div class="pkg_wiz_2">
				Importing... (This may take a while)
			</div>

			{{ render_field(form.website, class_="pkg_meta") }}
			{{ render_field(form.issueTracker, class_="pkg_meta") }}
			{{ render_field(form.forums, class_="pkg_meta", placeholder="Tip: paste in a forum topic URL") }}
		</fieldset>

		<div class="pkg_meta">{{ render_submit_field(form.submit) }}</div>
	</form>
{% endblock %}