Merge branch 'MDL-57570-master' of https://github.com/mwehr/moodle
[moodle.git] / mod / forum / templates / big_search_form.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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     Big search form.
19 }}
20 <div id="intro" class="box searchbox boxaligncenter">
21     {{#str}}searchforumintro, forum{{/str}}
22 </div>
23 <div class="box generalbox boxaligncenter">
24     <script type="text/javascript" src="{{scripturl}}"></script>
25     <form id="searchform" action="{{actionurl}}" method="get">
26         <table class="searchbox" id="form" cellpadding="10">
27             <tr>
28                 <td class="c0">
29                     <label for="words">{{#str}}searchwords, forum{{/str}}</label>
30                     <input type="hidden" value="{{courseid}}" name="id">
31                 </td>
32                 <td class="c1">
33                     <input type="text" size="35" name="words" id="words" value="{{words}}">
34                 </td>
35             </tr>
36             <tr>
37                 <td class="c0">
38                     <label for="phrase">{{#str}}searchphrase, forum{{/str}}</label>
39                 </td>
40                 <td class="c1">
41                     <input type="text" size="35" name="phrase" id="phrase" value="{{phrase}}">
42                 </td>
43             </tr>
44             <tr>
45                 <td class="c0">
46                     <label for="notwords">{{#str}}searchnotwords, forum{{/str}}</label>
47                 </td>
48                 <td class="c1">
49                     <input type="text" size="35" name="notwords" id="notwords" value="{{notwords}}">
50                 </td>
51             </tr>
52             {{#showfullwords}}
53                 <tr>
54                     <td class="c0">
55                         <label for="fullwords">{{#str}}searchfullwords, forum{{/str}}</label>
56                     </td>
57                     <td class="c1">
58                         <input type="text" size="35" name="fullwords" id="fullwords" value="{{fullwords}}">
59                     </td>
60                 </tr>
61             {{/showfullwords}}
62             <tr>
63                 <td class="c0">
64                     {{#str}}searchdatefrom, forum{{/str}}
65                 </td>
66                 <td class="c1">
67                     <input type="checkbox" name="timefromrestrict" value="1" onclick="return lockoptions('searchform', 'timefromrestrict', timefromitems)" {{#datefromchecked}}checked{{/datefromchecked}}>
68                     {{{datefromfields}}}
69                     <input type="hidden" name="hfromday" value="0">
70                     <input type="hidden" name="hfrommonth" value="0">
71                     <input type="hidden" name="hfromyear" value="0">
72                     <input type="hidden" name="hfromhour" value="0">
73                     <input type="hidden" name="hfromminute" value="0">
74                 </td>
75             </tr>
76             <tr>
77                 <td class="c0">
78                     {{#str}}searchdateto, forum{{/str}}
79                 </td>
80                 <td class="c1">
81                     <input type="checkbox" name="timetorestrict" value="1" onclick="return lockoptions('searchform', 'timetorestrict', timetoitems)" {{#datetochecked}}checked{{/datetochecked}}>
82                     {{{datetofields}}}
83                     <input type="hidden" name="htoday" value="0">
84                     <input type="hidden" name="htomonth" value="0">
85                     <input type="hidden" name="htoyear" value="0">
86                     <input type="hidden" name="htohour" value="0">
87                     <input type="hidden" name="htominute" value="0">
88                 </td>
89             </tr>
90             <tr>
91                 <td class="c0">
92                     <label for="menuforumid">{{#str}}searchwhichforums, forum{{/str}}</label>
93                 </td>
94                 <td class="c1">
95                     <select name="menuforumid" id="menuforumid">
96                         {{#forumoptions}}
97                             <option value="{{value}}">{{name}}</option>
98                         {{/forumoptions}}
99                     </select>
100                 </td>
101             </tr>
102             <tr>
103                 <td class="c0">
104                     <label for="subject">{{#str}}searchsubject, forum{{/str}}</label>
105                 </td>
106                 <td class="c1">
107                     <input type="text" size="35" name="subject" id="subject" value="{{subject}}">
108                 </td>
109             </tr>
110             <tr>
111                 <td class="c0">
112                     <label for="user">{{#str}}searchuser, forum{{/str}}</label>
113                 </td>
114                 <td class="c1">
115                     <input type="text" size="35" name="user" id="user" value="{{user}}">
116                 </td>
117             </tr>
118             <tr>
119                 <td colspan="2" class="submit" align="center">
120                     <input type="submit" value={{#quote}}{{#str}}searchforums, forum{{/str}}{{/quote}}>
121                 </td>
122             </tr>
123         </table>
124     </form>
125     {{#js}}
126         lockoptions_timetoitems();
127         lockoptions_timefromitems();
128     {{/js}}
129 </div>