-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathedit.html.twig
More file actions
114 lines (95 loc) · 5.46 KB
/
edit.html.twig
File metadata and controls
114 lines (95 loc) · 5.46 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
{% extends '@forum/layout.html.twig' %}
{% block content %}
{{ fireHook('view.edit.start') }}
<div class="linkst">
<div class="inbox">
<ul class="crumbs">
<li><a href="{{ urlBase() }}">{{ trans('Index') }}</a></li>
<li><span>» </span><a href="{{ pathFor('Forum', {'id': cur_post.fid, 'name': slug(cur_post.forum_name)}) }}">{{ cur_post.forum_name }}</a></li>
<li><span>» </span><a href="{{ pathFor('Topic', {'id': cur_post.tid, 'name': slug(cur_post.subject)}) }}">{{ cur_post.subject }}</a></li>
<li><span>» </span><strong>{{ trans('Edit post') }}</strong></li>
</ul>
</div>
</div>
{#// If there are errors, we display them#}
{% if errors is not empty %}
<div id="posterror" class="block">
<h2><span>{{ trans('Post errors') }}</span></h2>
<div class="box">
<div class="inbox error-info">
<p>{{ trans('Post errors info') }}</p>
<ul class="error-list">
{% for cur_error in errors %}
<li><strong>{{ cur_error }}</strong></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% elseif inputPost('preview') is not empty %}
<div id="postpreview" class="blockpost">
<h2><span>{{ trans('Post preview') }}</span></h2>
<div class="box">
<div class="inbox">
<div class="postbody">
<div class="postright">
<div class="postmsg">
{{ preview_message|raw }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<div id="editform" class="blockform">
<h2><span>{{ trans('Edit post') }}</span></h2>
<div class="box">
<form id="edit" method="post" action="{{ pathFor('editPost', {'id': id}) }}" onsubmit="return process_form(this)">
<input type="hidden" name="csrf_name" value="{{ csrf_name }}">
<input type="hidden" name="csrf_value" value="{{ csrf_value }}">
<div class="inform">
<fieldset>
<legend>{{ trans('Edit post legend') }}</legend>
<input type="hidden" name="form_sent" value="1" />
<div class="infldset txtarea">
{% if can_edit_subject %}
<label class="required"><strong>{{ trans('Subject') }} <span>{{ trans('Required') }}</span></strong><br />
<input class="longinput" type="text" name="req_subject" size="80" maxlength="70" tabindex="{{ cur_index }}" value="{{ inputPost('req_subject') ? inputPost('req_subject') : cur_post.subject }}" /><br /></label>
{% set cur_index = cur_index + 1 %}
{% endif %}
<label class="required"><strong>{{ trans('Message') }} <span>{{ trans('Required') }}</span></strong><br />
<textarea name="req_message" id="req_message" rows="20" tabindex="{{ cur_index }}">{{ inputPost('req_message') ? post.message : cur_post.message }}</textarea><br /></label>
{% set cur_index = cur_index + 1 %}
<ul class="bblinks list-inline">
<li><span><a href="{{ pathFor('help') }}#bbcode" onclick="window.open(this.href); return false;">{{ trans('BBCode') }}</a> {{ settings('p_message_bbcode') == '1' ? trans('on') : trans('off') }}</span></li>
<li><span><a href="{{ pathFor('help') }}#url" onclick="window.open(this.href); return false;">{{ trans('url tag') }}</a> {{ settings('p_message_bbcode') == '1' and can('post.links') ? trans('on') : trans('off') }}</span></li>
<li><span><a href="{{ pathFor('help') }}#img" onclick="window.open(this.href); return false;">{{ trans('img tag') }}</a> {{ settings('p_message_bbcode') == '1' and settings('p_message_img_tag') == '1' ? trans('on') : trans('off') }}</span></li>
<li><span><a href="{{ pathFor('help') }}#smilies" onclick="window.open(this.href); return false;">{{ trans('Smilies') }}</a> {{ settings('o_smilies') == '1' ? trans('on') : trans('off') }}</span></li>
</ul>
</div>
</fieldset>
</div>
{% if checkboxes is not empty %}
<div class="inform">
<fieldset>
<legend>{{ trans('Options') }}</legend>
<div class="infldset">
<div class="rbox">
{{ checkboxes|join("\n\t\t\t\t\t\t\t")|raw }}
</div>
</div>
</fieldset>
</div>
{% endif %}
<p class="buttons">
<input type="submit" name="submit" value="{{ trans('Submit') }}" tabindex="{{ cur_index }}" accesskey="s" />
{% set cur_index = cur_index + 1 %}
<input type="submit" name="preview" value="{{ trans('Preview') }}" tabindex="{{ cur_index }}" accesskey="p" />
<a href="javascript:history.go(-1)">{{ trans('Go back') }}</a>
</p>
</form>
</div>
</div>
{{ fireHook('view.edit.end') }}
{% endblock content %}