MDL-57550 forum: fix template validation issues
authorDan Poltawski <dan@moodle.com>
Fri, 30 Dec 2016 09:01:19 +0000 (09:01 +0000)
committerDan Poltawski <dan@moodle.com>
Mon, 23 Jan 2017 09:45:11 +0000 (09:45 +0000)
* Add some missing example contexts
* Stop using obsolete cell attributes

mod/forum/templates/big_search_form.mustache
theme/boost/templates/mod_forum/big_search_form.mustache

index 57999ce..8a8a7f6 100644 (file)
@@ -21,7 +21,6 @@
 
     Example context (json):
     {
-        "scripturl": "https://example.com/mod/forum/forum.js",
         "actionurl": "https://example.com/mod/forum/search.php",
         "courseid": "2",
         "words": "apples",
@@ -53,7 +52,7 @@
 </div>
 <div class="box generalbox boxaligncenter">
     <form id="searchform" action="{{actionurl}}" method="get">
-        <table class="searchbox" id="form" cellpadding="10">
+        <table class="searchbox table" id="form">
             <tr>
                 <td class="c0">
                     <label for="words">{{#str}}searchwords, forum{{/str}}</label>
                 </td>
             </tr>
             <tr>
-                <td colspan="2" class="submit" align="center">
-                    <input type="submit" value={{#quote}}{{#str}}searchforums, forum{{/str}}{{/quote}}>
+                <td colspan="2" class="submit">
+                    <div class="text-center">
+                        <input type="submit" value={{#quote}}{{#str}}searchforums, forum{{/str}}{{/quote}}>
+                    </div>
                 </td>
             </tr>
         </table>
index a7a956c..32d30d4 100644 (file)
@@ -21,7 +21,6 @@
 
     Example context (json):
     {
-        "scripturl": "https://example.com/mod/forum/forum.js",
         "actionurl": "https://example.com/mod/forum/search.php",
         "courseid": "2",
         "words": "apples",
@@ -53,7 +52,7 @@
 </div>
 <div class="box generalbox boxaligncenter">
     <form id="searchform" action="{{actionurl}}" method="get">
-        <table class="searchbox table table-striped" id="form" cellpadding="10">
+        <table class="searchbox table table-striped" id="form">
             <tr>
                 <td class="c0 text-xs-right">
                     <label for="words">{{#str}}searchwords, forum{{/str}}</label>
@@ -171,4 +170,4 @@ require(['jquery'], function($) {
         toggleDateFields('to', !this.checked);
     });
 });
-{{/js}}
\ No newline at end of file
+{{/js}}