|
| 1 | +{% import 'layout/edit.tmpl' as edit with context %} |
1 | 2 | <form method="POST" |
2 | | - {% if context.id %} |
3 | | - action='issue{{ context.id }}' |
4 | | - {% else %} |
5 | | - action='issue' |
6 | | - {% endif %} |
| 3 | + {% if context.id -%} |
| 4 | + action="issue{{ context.id }}" |
| 5 | + {% else -%} |
| 6 | + action="issue" |
| 7 | + {% endif -%} |
7 | 8 | name="itemSynopsis" |
8 | 9 | enctype="multipart/form-data" |
9 | 10 | class="col-xl-6" |
10 | 11 | > |
11 | 12 | <fieldset> |
12 | | - <!-- title --> |
13 | | - <div class='form-group row'> |
14 | | - <label class='col-3 col-form-label' for='title'>{% trans %}Title{% endtrans %}</label> |
15 | | - <div class='col-9'> |
16 | | - <input class="form-control" name='title' id='title' type='text' class='input-lg' value='{{ context.title.plain()|u }}' required> |
17 | | - </div> |
18 | | - </div> <!-- form-group row --> |
19 | | - |
20 | | - <!-- priority & Status --> |
21 | | - <div class='form-group row'> |
22 | | - <label class='col-3 col-form-label' for='priority'>{% trans %}Priority{% endtrans %}</label> |
23 | | - <div class='col-3'> |
24 | | - {{ context.priority.menu(html_kwargs={"class": "custom-select"})|u|safe }} |
25 | | - </div> |
26 | | - <label class='col-3 col-form-label' for='status'>{% trans %}Status{% endtrans %}</label> |
27 | | - <div class='col-3'> |
28 | | - {{ context.status.menu(html_kwargs={"class": "custom-select"})|u|safe }} |
29 | | - </div> |
30 | | - </div> <!-- form-group row --> |
31 | | - |
32 | | - <!-- Superseder & nosy list --> |
33 | | - <div class='form-group row'> |
34 | | - <label class='col-3 col-form-label' for='superseder'>{% trans %}Superseder{% endtrans %}</label> |
35 | | - <div class='col-3'> |
36 | | - <input class="form-control" type='text' name='superseder' id='superseder' value='{{ context.superseder.plain()|u }}'> |
37 | | - </div> |
38 | | - <label class='col-3 col-form-label' for='nosylist'>{% trans %}Nosy list{% endtrans %}</label> |
39 | | - <div class='col-3'> |
40 | | - <input class="form-control" type='text' name='nosy' id='nosylist' value='{{ context.nosy.plain()|u }}'> |
41 | | - </div> |
42 | | - </div> <!-- form-group row --> |
43 | | - |
44 | | - <!-- Assigned to & keywords --> |
45 | | - <div class='form-group row'> |
46 | | - <label class='col-3 col-form-label' for='assignedto'>{% trans %}Assigned to{% endtrans %}</label> |
47 | | - <div class='col-3'> |
48 | | - {{ context.assignedto.menu(html_kwargs={"class": "custom-select"})|u|safe }} |
49 | | - </div> |
50 | | - <label class='col-3 col-form-label' for='keyword'>{% trans %}Keywords{% endtrans %}</label> |
51 | | - <div class='col-3'> |
52 | | - <input class="form-control" type='text' name='keyword' id='keyword' value='{{ context.keyword.plain()|u }}'> |
53 | | - </div> |
54 | | - </div> <!-- form-group row --> |
55 | | - |
56 | | - <!-- Note --> |
57 | | - <div class='form-group row'> |
58 | | - <label class='col-3 col-form-label' for='change_note'>{% trans %}Change note{% endtrans %}</label> |
59 | | - <div class='col-9'> |
60 | | - <textarea class="form-control" name="@note" rows="5" class='input-lg' id='change_note'></textarea> |
61 | | - </div> |
62 | | - </div> <!-- form-group row --> |
63 | | - |
64 | | - <!-- File upload --> |
65 | | - <div class='form-group row'> |
66 | | - <label class='col-3 col-form-label' for='file_upload'>{% trans %}File{% endtrans %}</label> |
67 | | - <div class='col-3'> |
68 | | - <input class="form-control-file" type="file" name="@file" id='file_upload'> |
69 | | - </div> |
70 | | - </div> <!-- form-group row --> |
| 13 | + <dl class="row row-cols-1 row-cols-lg-2 no-gutters"> |
| 14 | + {{ edit.input_text_large('Title', 'title', 'title', required=True) }} |
| 15 | + {{ edit.input_option('Priority', 'priority', required=True) }} |
| 16 | + {{ edit.input_option('Status', 'status') }} |
| 17 | + {{ edit.input_text_small('Superseder', 'superseder', 'superseder') }} |
| 18 | + {{ edit.input_text_small('Nosy list', 'nosylist', 'nosy') }} |
| 19 | + {{ edit.input_option('Assigned to', 'assignedto') }} |
| 20 | + {{ edit.input_text_small('Keywords', 'keyword', 'keyword') }} |
| 21 | + {{ edit.input_textarea('Change note', 'change_note', '@note') }} |
| 22 | + {{ edit.input_file('File', 'file_upload', '@file') }} |
| 23 | + </dl> |
71 | 24 | </fieldset> |
72 | | - <div class='form-actions'> |
| 25 | + <div class="form-actions"> |
73 | 26 | {{ context.submit(html_kwargs={"class": "btn btn-primary"})|u|safe }} |
74 | 27 | {% if context.id %} |
75 | 28 | <a href='{{ context.copy_url() }}'>{% trans %}Make a copy{% endtrans %}</a> |
|
0 commit comments