]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/nopaste/create.html
donation: Fix typo
[ipfire.org.git] / src / templates / nopaste / create.html
1 {% extends "../base.html" %}
2
3 {% block title %}
4 {% if mode == "paste" %}
5 {{ _("New Paste") }}
6 {% elif mode == "upload" %}
7 {{ _("Upload File") }}
8 {% end %}
9 {% end block %}
10
11 {% block content %}
12 <div class="row justify-content-center">
13 <div class="col-12 col-md-8">
14 {% if mode == "paste" %}
15 <h1>{{ _("New Paste") }}</h2>
16 {% elif mode == "upload" %}
17 <h1>{{ _("Upload File") }}</h3>
18 {% end %}
19
20 <form class="form-horizontal" action="" method="POST" enctype="multipart/form-data">
21 {% raw xsrf_form_html() %}
22
23 <input type="hidden" name="mode" value="{{ mode }}">
24
25 {% if mode == "paste" %}
26 <div class="form-group">
27 <label>{{ _("Subject") }}</label>
28 <input type="text" class="form-control" name="subject"
29 placeholder="{{ _("Subject") }} ({{ _("optional") }})">
30 </div>
31 {% end %}
32
33 <div class="form-group">
34 {% if mode == "paste" %}
35 <textarea class="form-control" rows="12" name="content"
36 placeholder="{{ _("Please paste your content here...") }}"></textarea>
37 {% elif mode == "upload" %}
38 <label>{{ _("File") }}</label>
39 <input type="file" name="file" class="form-control-file">
40
41 {% if max_size %}
42 <small class="form-text text-muted">
43 {{ _("You may upload up to %s") % format_size(max_size) }}
44 </small>
45 {% end %}
46 {% end %}
47 </div>
48
49 <div class="form-group">
50 <label>{{ _("Expires") }}</label>
51
52 <select class="form-control" name="expires">
53 <option value="0">{{ _("never") }}</option>
54 <option value="600">{{ _("after ten minutes") }}</option>
55 <option value="3600">{{ _("after one hour") }}</option>
56 <option value="{{ 24 * 3600 }}">{{ _("after one day") }}</option>
57 <option value="{{ 7 * 24 * 3600 }}">{{ _("after one week") }}</option>
58 <option value="{{ 30 * 24 * 3600 }}" selected>{{ _("after one month") }}</option>
59 </select>
60 </div>
61
62 <button type="submit" class="btn btn-primary btn-block">{{ _("Submit") }}</button>
63 </form>
64 </div>
65 </div>
66 {% end block %}