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
|
|
|
19 |
|
|
|
20 |
Template which defines a forum post for sending in a single-post HTML email.
|
|
|
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 |
"throttlingwarningmsg": "You are approaching the posting threshold. You have posted 3 times in the last 1 week and the limit is 4 posts."
|
|
|
35 |
}
|
|
|
36 |
}}
|
|
|
37 |
<div class="row" data-content="inpage-reply-content" style="display: none;">
|
|
|
38 |
<div class="card card-body">
|
|
|
39 |
{{#throttlingwarningmsg}}
|
|
|
40 |
<div class="alert alert-danger alert-block fade in " role="alert">
|
|
|
41 |
{{throttlingwarningmsg}}
|
|
|
42 |
</div>
|
|
|
43 |
{{/throttlingwarningmsg}}
|
|
|
44 |
<form data-post-id="{{postid}}" id="inpage-reply-{{postid}}" data-content="inpage-reply-form" action="{{{reply_url}}}">
|
|
|
45 |
<div class="row pb-1">
|
|
|
46 |
<span>
|
|
|
47 |
<textarea rows="5" name="post" title="{{#str}} message, mod_forum {{/str}}" class="form-control" placeholder="{{#str}} replyplaceholder, forum {{/str}}"></textarea>
|
|
|
48 |
<input type="hidden" name="postformat" value="{{postformat}}"/>
|
|
|
49 |
</span>
|
|
|
50 |
<input type="hidden" name="subject" value="{{parentsubject}}"/>
|
|
|
51 |
<input type="hidden" name="reply" value="{{postid}}"/>
|
|
|
52 |
<input type="hidden" name="sesskey" value="{{sesskey}}"/>
|
|
|
53 |
</div>
|
|
|
54 |
<div class="row">
|
|
|
55 |
<button class="btn btn-primary" data-action="forum-inpage-submit">
|
|
|
56 |
<span data-region="submit-text">{{#str}} posttoforum, mod_forum {{/str}}</span>
|
|
|
57 |
<span data-region="loading-icon-container" class="hidden">{{> core/loading }}</span>
|
|
|
58 |
</button>
|
|
|
59 |
<button class="btn btn-secondary" data-action="collapsible-link" name="cancelbtn">
|
|
|
60 |
{{#str}} cancel, core {{/str}}
|
|
|
61 |
</button>
|
|
|
62 |
{{#canreplyprivately}}
|
|
|
63 |
<div class="form-check form-check-inline">
|
|
|
64 |
<input type="checkbox" class="form-check-input" id="private-reply-checkbox-{{uniqid}}" title="{{#str}} privatereply, forum {{/str}}" name="privatereply"/>
|
|
|
65 |
<label class="form-check-label" for="private-reply-checkbox-{{uniqid}}">{{#str}} privatereply, forum {{/str}}</label>
|
|
|
66 |
</div>
|
|
|
67 |
{{/canreplyprivately}}
|
|
|
68 |
<button data-action="forum-advanced-reply" class="btn btn-link float-right" type="submit">
|
|
|
69 |
{{#str}} advanced, core {{/str}}
|
|
|
70 |
</button>
|
|
|
71 |
</div>
|
|
|
72 |
</form>
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|