MDL-65948 core_grade: Use new core/checkbox-toggleall
[moodle.git] / grade / templates / edit_tree.mustache
index 5c4c539..5767d76 100644 (file)
 {{!
     @template core_grades/edit_tree
 
-    Edit tree.
+    Edit tree template.
+
+    Context variables required for this template:
+    * actionurl - string - Form action URL.
+    * sesskey - string - The session key.
+    * notification - object - Context data for the notification.
+    * showsave - boolean - Whether to show the save changes button.
+    * showbulkmove - boolean - Whether to show the bulk move select menu.
+    * table - string - HTML content of the grade items table.
+    * bulkmoveoptions - array - Key-value pair array for the options of the the bulk move select menu element.
 
     Example context (json):
     {
-        "actionurl": "https://domain.example/grade/edit/tree/index.php?id=4",
+        "actionurl": "#",
         "sesskey": "fakesesskey",
         "notification": "",
         "table": "<table class='generaltable simple setup-grades' id='grade_edit_tree_table'><thead> <tr><th>Name</th><th>Weights</th><th>Max grade</th><th>Actions</th> </tr></thead><tbody></tbody></table>",
@@ -48,7 +57,8 @@
                 <div class="form-inline mt-3">
                     <input type="hidden" name="bulkmove" value="0" id="bulkmoveinput">
                     <label for="menumoveafter">{{#str}}moveselectedto, grades{{/str}}</label>
-                    <select name="moveafter" id="menumoveafter" class="ignoredirty singleselect custom-select form-control">
+                    <select name="moveafter" id="menumoveafter" class="ignoredirty singleselect custom-select form-control"
+                            data-action="toggle" data-toggle="action" data-togglegroup="category" disabled>
                         {{#bulkmoveoptions}}
                             <option value="{{value}}">{{name}}</option>
                         {{/bulkmoveoptions}}