-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathproblem_edit.html
68 lines (68 loc) · 2.46 KB
/
problem_edit.html
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
{% extends "layout/basic.html" %}
{% block content %}
<div class="row">
<div class="medium-9 columns">
<div class="section">
<div class="section__body">
<form method="post">
<div class="row">
<div class="medium-7 columns">
<label>
{{ _('Title') }}
<input name="title" placeholder="{{ _('title') }}" value="{{ pdoc['title']|default('') }}" class="textbox" autofocus>
</label>
</div>
<div class="medium-3 columns">
<label>
{{ _('pname') }}
<br>
<label>
<input name="pname" placeholder="{{ _('Leave blank to use numeric pid.') }}" value="{{ pdoc['pname']|default('') }}" class="textbox">
</label>
</label>
</div>
<div class="medium-2 columns">
<label>
<br>
<label class="checkbox">
<input type="checkbox" name="hidden" value="on"{% if pdoc['hidden'] %} checked{% endif %}>{{ _('Hidden') }}
</label>
</label>
</div>
</div>
<div class="row"><div class="columns">
<label>
{{ _('Content') }}
<textarea name="content" class="textbox" data-markdown style="height: 500px">{% if pdoc %}{{ pdoc['content'] }}{% else %}{% include 'partials/problem_default.md' %}{% endif %}</textarea>
</label>
</div></div>
<div class="row"><div class="columns">
<input type="hidden" name="csrf_token" value="{{ handler.csrf_token }}">
{% if page_name == 'problem_edit' %}
<button type="submit" class="rounded primary button">
{{ _('Update') }}
</button>
{% else %}
<button 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">
{% if page_name == 'problem_edit' %}
{% with owner_udoc=udoc, owner_dudoc=dudoc %}
{% include "partials/problem_sidebar.html" %}
{% endwith %}
{% else %}
{% include 'components/md_hint.html' %}
{% endif %}
</div>
</div>
{% endblock %}