]>
Commit | Line | Data |
---|---|---|
66862195 MT |
1 | {% extends "../base.html" %} |
2 | ||
b0b3e3e7 MT |
3 | {% block title %} |
4 | {% if mode == "paste" %} | |
5 | {{ _("New Paste") }} | |
6 | {% elif mode == "upload" %} | |
7 | {{ _("Upload File") }} | |
8 | {% end %} | |
9 | {% end block %} | |
66862195 | 10 | |
60b0917c | 11 | {% block container %} |
60b0917c | 12 | |
3ca6409b SH |
13 | <div class="container"> |
14 | <section class="features-content col-12"> | |
15 | {% if mode == "paste" %} | |
16 | <h2 class="display-2 text-center">{{ _("New Paste") }}</h2> | |
17 | {% elif mode == "upload" %} | |
18 | <h2 class="display-2 text-center">{{ _("Upload File") }}</h3> | |
19 | {% end %} | |
20 | ||
21 | <div class="row"> | |
22 | <div class="col"> | |
23 | <form class="form-horizontal" action="" method="POST" enctype="multipart/form-data"> | |
24 | <div class="form-group"> | |
25 | <input type="hidden" name="mode" value="{{ mode }}"> | |
26 | ||
27 | {% if mode == "paste" %} | |
28 | <div class="col"> | |
29 | <textarea class="form-control" rows="12" name="content" | |
30 | placeholder="{{ _("Please paste your content here...") }}"></textarea> | |
31 | </div> | |
32 | {% elif mode == "upload" %} | |
33 | <label for="inputFile" class="col-2 control-label">{{ _("File") }}</label> | |
34 | <div class="col-10"> | |
35 | <input type="file" id="inputFile" name="file"> | |
36 | ||
37 | {% if max_size %} | |
38 | <p class="help-block"> | |
39 | {{ _("You may upload up to %s.") % format_size(max_size) }} | |
40 | </p> | |
41 | {% end %} | |
42 | </div> | |
60b0917c MT |
43 | {% end %} |
44 | </div> | |
3ca6409b SH |
45 | |
46 | {% if mode == "paste" %} | |
47 | <div class="form-group"> | |
48 | <label for="inputSubject" class="col-2 control-label">{{ _("Subject") }}</label> | |
49 | <div class="col-10"> | |
50 | <input type="subject" class="form-control" id="inputSubject" | |
51 | name="subject" placeholder="{{ _("Subject") }} ({{ _("optional") }})"> | |
52 | </div> | |
53 | </div> | |
54 | {% end %} | |
55 | ||
56 | <div class="form-group"> | |
57 | <label for="inputExpires" class="col-2 control-label">{{ _("Expires") }}</label> | |
58 | <div class="col-10"> | |
59 | <select class="form-control" id="inputExpires" name="expires"> | |
60 | <option value="0">{{ _("never") }}</option> | |
61 | <option value="600">{{ _("after ten minutes") }}</option> | |
62 | <option value="3600">{{ _("after one hour") }}</option> | |
63 | <option value="{{ 24 * 3600 }}">{{ _("after one day") }}</option> | |
64 | <option value="{{ 7 * 24 * 3600 }}">{{ _("after one week") }}</option> | |
65 | <option value="{{ 30 * 24 * 3600 }}" selected>{{ _("after one month") }}</option> | |
66 | </select> | |
67 | </div> | |
60b0917c | 68 | </div> |
3ca6409b SH |
69 | |
70 | <div class="form-group"> | |
71 | <div class="col-10"> | |
72 | <button type="submit" class="btn btn-primary">{{ _("Submit") }}</button> | |
73 | </div> | |
74 | </div> | |
75 | ||
76 | {% raw xsrf_form_html() %} | |
77 | </form> | |
66862195 | 78 | </div> |
3ca6409b | 79 | </div> |
60b0917c | 80 | </section> |
3ca6409b SH |
81 | </div> |
82 | ||
66862195 | 83 | {% end block %} |