MDL-66076 forumreport_summary: Template example context fixes
authorMichael Hawkins <michaelh@moodle.com>
Tue, 8 Oct 2019 15:23:19 +0000 (23:23 +0800)
committerJun Pataleta <jun@moodle.com>
Fri, 11 Oct 2019 03:09:50 +0000 (11:09 +0800)
mod/forum/report/summary/templates/bulk_action_menu.mustache
mod/forum/report/summary/templates/filters.mustache

index aa36045..bc01440 100644 (file)
@@ -1,3 +1,54 @@
+{{!
+    This file is part of Moodle - http://moodle.org/
+
+    Moodle is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    Moodle is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+    @template forumreport_summary/bulk_action_menu
+
+    Summary report filters.
+
+    Example context (json):
+    {
+        "id": "formactionid",
+        "attributes": [
+            {
+                "name": "data-action",
+                "value": "toggle"
+            },
+            {
+                "name": "data-togglegroup",
+                "value": "summaryreport-table"
+            },
+            {
+                "name": "data-toggle",
+                "value": "action"
+            }
+        ],
+        "actions": [
+            {
+                "name": "Choose...",
+                "value": ""
+            },
+            {
+                "name": "Send a message",
+                "value": "#messageselect"
+            }
+        ]
+    }
+}}
+
 <br /><div class="buttons"><div class="form-inline">
     <label for="{{id}}">{{#str}}withselectedusers{{/str}}</label>
     <select id="{{id}}" class="select custom-select ml-2" {{#attributes}}{{name}}="{{value}}" {{/attributes}}>
index ec243ae..bc84d0d 100644 (file)
         "filtergroupsname" : "Groups (all)",
         "filtergroups": [
             {
-                "gropuid": "1",
+                "groupid": "1",
                 "groupname": "Group A",
                 "checked": true
             },
             {
-                "gropuid": "3",
+                "groupid": "3",
                 "groupname": "Group C",
                 "checked": false
             }