Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 data-content="inpage-reply-content" style="display: none;">
38
    {{#throttlingwarningmsg}}
39
        <div class="alert alert-danger alert-block fade in " role="alert">
40
            {{throttlingwarningmsg}}
41
        </div>
42
    {{/throttlingwarningmsg}}
43
 
44
    <div class="forum-post-reply">
45
        <form data-post-id="{{postid}}" id="inpage-reply-{{postid}}" data-content="inpage-reply-form" action="{{{reply_url}}}">
46
            <div class="mb-1">
47
                <div class="w-100">
48
                    <textarea rows="5" name="post" title="{{#str}} message, mod_forum {{/str}}" class="form-control mb-2 w-100" placeholder="{{#str}} replyplaceholder, forum {{/str}}"></textarea>
49
                    <input type="hidden" name="postformat" value="{{postformat}}"/>
50
                </div>
51
                <input type="hidden" name="subject" value="{{parentsubject}}"/>
52
                <input type="hidden" name="reply" value="{{postid}}"/>
53
                <input type="hidden" name="sesskey" value="{{sesskey}}"/>
54
            </div>
55
            <div class="d-inline-flex flex-wrap justify-content-between align-items-center w-100 mb-md-4">
56
                <div class="d-inline-flex flex-wrap align-items-center">
57
                    <button class="btn btn-primary mr-1" title="{{#str}} submit, core {{/str}}" data-action="forum-inpage-submit">
58
                        <span data-region="submit-text">{{#str}} submit, core {{/str}}</span>
59
                        <span data-region="loading-icon-container" class="hidden">{{> core/loading }}</span>
60
                    </button>
61
                    <button class="btn btn-secondary" title="{{#str}} cancel, core {{/str}}" data-action="collapsible-link">
62
                        {{#str}} cancel, core {{/str}}
63
                    </button>
64
                    {{#canreplyprivately}}
65
                    <div class="custom-control custom-switch ml-2 d-flex align-items-center">
66
                        <div class="custom-control custom-switch d-flex align-items-center">
67
                            <input name="privatereply" type="checkbox" class="custom-control-input" id="private-reply-checkbox-{{uniqid}}" aria-label="{{#str}} privatereply, forum {{/str}}">
68
                            <label class="custom-control-label m-0" for="private-reply-checkbox-{{uniqid}}">
69
                                {{#str}} privatereply, forum {{/str}}
70
                            </label>
71
                        </div>
72
                    </div>
73
                    {{/canreplyprivately}}
74
                </div>
75
 
76
                <button title="{{#str}} advanced, core {{/str}}" data-action="forum-advanced-reply" class="forum-advanced-btn btn btn-info border-0 float-right" type="submit">
77
                    <svg class="mr-2" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
78
                        <path d="M5.75 13L7.75 19.25H16.25L18.25 13L12 4.75L5.75 13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
79
                        <path d="M5.75 19.25H18.25" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
80
                        <path d="M12 4.75V12.25" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
81
                    </svg>
82
                    {{#str}} advanced, core {{/str}}
83
                </button>
84
            </div>
85
        </form>
86
    </div>
87
</div>