forked from hydro-dev/Hydro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomework_edit.html
More file actions
135 lines (135 loc) · 4.63 KB
/
Copy pathhomework_edit.html
File metadata and controls
135 lines (135 loc) · 4.63 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{% extends "layout/basic.html" %}
{% block content %}
<div class="row">
<div class="medium-9 columns">
<div class="section">
<div class="section__body">
<form method="post">
{{ form.form_text({
columns:12,
label:'Title',
name:'title',
placeholder:_('title'),
value:tdoc['title']|default(''),
autofocus:true
}) }}
<div class="row">
{{ form.form_text({
columns:3,
label:'Begin Date',
name:'beginAtDate',
placeholder:'YYYY-mm-dd',
value:dateBeginText,
date:true,
row:false
}) }}
{{ form.form_text({
columns:2,
label:'Begin Time',
name:'beginAtTime',
placeholder:'HH:MM',
value:timeBeginText,
time:true,
row:false
}) }}
{{ form.form_text({
columns:3,
label:'End Date',
name:'penaltySinceDate',
placeholder:'YYYY-mm-dd',
value:datePenaltyText,
date:true,
row:false
}) }}
{{ form.form_text({
columns:2,
label:'End Time',
name:'penaltySinceTime',
placeholder:'HH:MM',
value:timePenaltyText,
time:true,
row:false
}) }}
{{ form.form_text({
row:false,
last_column:true,
columns:2,
label:'Extension (days)',
name:'extensionDays',
value:extensionDays
}) }}
</div>
<div class="row">
{{ form.form_text({
row:false,
columns:6,
label:'Assign',
name:'assign',
placeholder:_('Group / UID'),
value:tdoc.assign|default('')
}) }}
{{ form.form_text({
row:false,
last_column:true,
columns:6,
label:'Homework Maintainer',
name:'maintainer',
help_text:_('Allow to maintain this {0}').format(_('homework')),
value:tdoc.maintainer|default('')
}) }}
</div>
<div class="row"><div class="columns">
<label>
{{ _('Extension Score Penalty') }}
<textarea name="penaltyRules" class="monospace textbox" data-yaml>{% if tdoc %}{{ penaltyRules }}{% else %}{% include 'partials/homework_default_penalty_rules.yaml' %}{% endif %}</textarea>
</label>
</div></div>
{{ form.form_text({
columns:null,
label:'Problems',
name:'pids',
value:pids
}) }}
{{ form.form_begin({columns:null,label:_('Contest/Homework allow submit languages')}) }}
<div id="language-select-part">
<input name="limitLangList" value="{{limitLangListString}}">
</div>
{{ form.form_end({}) }}
{{ form.form_textarea({
columns:null,
label:'Content',
name:'content',
value:tdoc['content']|default(''),
markdown:true
}) }}
<div class="row"><div class="columns">
{% if page_name == 'homework_edit' %}
<button name="operation" value="update" type="submit" class="rounded primary button">
{{ _('Update') }}
</button>
<button name="operation" value="update" type="submit" formaction="{{ url('homework_create') }}" class="rounded button">
{{ _('Clone') }}
</button>
{% if handler.user.own(tdoc) or handler.user.hasPerm(perm.PERM_EDIT_HOMEWORK) %}
<button name="operation" value="delete" type="submit" class="rounded button">
{{ _('Delete') }}
</button>
{% endif %}
{% else %}
<button name="operation" value="update" type="submit" class="rounded primary button">
{{ _('Create') }}
</button>
{% endif %}
<button type="button" class="rounded button" onclick="window.history.go(-1)">
{{ _('Cancel') }}
</button>
</div></div>
</form>
</div>
</div>
</div>
<div class="medium-3 columns">
{% include 'components/md_hint.html' %}
</div>
</div>
{% endblock %}