1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template mod_forum/inpage_reply_v2
|
|
|
19 |
|
|
|
20 |
In page reply HTML for the nested v2 discussion display mode.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Example context (json):
|
|
|
29 |
{
|
|
|
30 |
"postid": 0,
|
|
|
31 |
"reply_url": "",
|
|
|
32 |
"sesskey": "",
|
|
|
33 |
"parentsubject": ""
|
|
|
34 |
}
|
|
|
35 |
}}
|
|
|
36 |
<div
|
|
|
37 |
class="mt-4 mb-4"
|
|
|
38 |
data-content="inpage-reply-content"
|
|
|
39 |
style="display: none;"
|
|
|
40 |
>
|
|
|
41 |
<div class="d-flex">
|
|
|
42 |
<div class="author-image-container d-inline-block mb-sm-3 mb-md-0 mr-3" style="width: 43px;">
|
|
|
43 |
{{#loggedinuser}}
|
|
|
44 |
<img
|
|
|
45 |
class="rounded"
|
|
|
46 |
style="width: 36px; height: 36px;"
|
|
|
47 |
src="{{{profileimageurl}}}"
|
|
|
48 |
alt="{{#str}} pictureof, core, {{fullname}} {{/str}}"
|
|
|
49 |
aria-hidden="true"
|
|
|
50 |
>
|
|
|
51 |
{{/loggedinuser}}
|
|
|
52 |
</div>
|
|
|
53 |
<div class="w-100">
|
|
|
54 |
{{#loggedinuser}}
|
|
|
55 |
<h4 class="h6 mt-2 reply-author">{{#str}} replyauthorself, mod_forum, {{firstname}}{{/str}}</h4>
|
|
|
56 |
{{/loggedinuser}}
|
|
|
57 |
{{#throttlingwarningmsg}}
|
|
|
58 |
<div class="alert alert-danger alert-block fade in " role="alert">
|
|
|
59 |
{{throttlingwarningmsg}}
|
|
|
60 |
</div>
|
|
|
61 |
{{/throttlingwarningmsg}}
|
|
|
62 |
<form data-post-id="{{postid}}" data-content="inpage-reply-form" action="{{{reply_url}}}">
|
|
|
63 |
<textarea
|
|
|
64 |
name="post"
|
|
|
65 |
rows="3"
|
|
|
66 |
class="w-100"
|
|
|
67 |
{{#parentauthorname}}
|
|
|
68 |
placeholder="{{#str}} replyingtoauthor, forum, {{.}} {{/str}}"
|
|
|
69 |
{{/parentauthorname}}
|
|
|
70 |
{{^parentauthorname}}
|
|
|
71 |
placeholder="{{#str}} replyplaceholder, forum {{/str}}"
|
|
|
72 |
{{/parentauthorname}}
|
|
|
73 |
data-auto-rows
|
|
|
74 |
data-min-rows="3"
|
|
|
75 |
data-max-rows="10"
|
|
|
76 |
></textarea>
|
|
|
77 |
<input type="hidden" name="postformat" value="{{postformat}}"/>
|
|
|
78 |
<input type="hidden" name="subject" value="{{parentsubject}}"/>
|
|
|
79 |
<input type="hidden" name="reply" value="{{postid}}"/>
|
|
|
80 |
<input type="hidden" name="sesskey" value="{{sesskey}}"/>
|
|
|
81 |
<div class="d-flex mt-3 align-items-center flex-wrap">
|
|
|
82 |
<button class="btn btn-primary btn-sm" data-action="forum-inpage-submit">
|
|
|
83 |
<span data-region="submit-text">{{#str}} posttoforum, mod_forum {{/str}}</span>
|
|
|
84 |
<span data-region="loading-icon-container" class="hidden">{{> core/loading }}</span>
|
|
|
85 |
</button>
|
|
|
86 |
<button data-action="forum-advanced-reply" class="btn btn-link mr-auto" type="submit">
|
|
|
87 |
{{#str}} advanced, core {{/str}}
|
|
|
88 |
</button>
|
|
|
89 |
{{#canreplyprivately}}
|
|
|
90 |
<div class="ml-2 custom-control custom-switch d-flex align-items-center">
|
|
|
91 |
<input name="privatereply" type="checkbox" class="custom-control-input" id="private-reply-checkbox-{{uniqid}}" aria-label="{{#str}} privatereply, forum {{/str}}">
|
|
|
92 |
<label class="custom-control-label m-0" for="private-reply-checkbox-{{uniqid}}">
|
|
|
93 |
{{#str}} privatereply, forum {{/str}}
|
|
|
94 |
</label>
|
|
|
95 |
</div>
|
|
|
96 |
{{/canreplyprivately}}
|
|
|
97 |
<button
|
|
|
98 |
class="btn btn-sm btn-outline-danger"
|
|
|
99 |
title="{{#str}} cancelreply, mod_forum {{/str}}"
|
|
|
100 |
data-action="cancel-inpage-reply"
|
|
|
101 |
>
|
|
|
102 |
{{#str}} delete, mod_forum {{/str}}
|
|
|
103 |
</button>
|
|
|
104 |
</div>
|
|
|
105 |
</form>
|
|
|
106 |
</div>
|
|
|
107 |
</div>
|
|
|
108 |
</div>
|