mod-forum MDL-16706 Removed inline JS and replaced with new PAGE methods
This commit is contained in:
+9
-1
@@ -15,4 +15,12 @@ function forum_produce_tracking_link(forumid, ltext, ltitle) {
|
||||
if(subs_link){
|
||||
subs_link.innerHTML = "<a title="+ltitle+" href='"+moodle_cfg.wwwroot+"/mod/forum/settracking.php?id="+forumid+"'>"+ltext+"<\/a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function lockoptions_timetoitems() {
|
||||
lockoptions('searchform','timefromrestrict', timefromitems);
|
||||
}
|
||||
|
||||
function lockoptions_timefromitems() {
|
||||
lockoptions('searchform','timetorestrict', timetoitems);
|
||||
}
|
||||
|
||||
@@ -351,10 +351,8 @@ function forum_print_big_search_form($course) {
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "lockoptions('searchform','timefromrestrict', timefromitems);";
|
||||
echo "lockoptions('searchform','timetorestrict', timetoitems);";
|
||||
echo "</script>\n";
|
||||
echo $PAGE->requires->js_function_call('lockoptions_timetoitems')->asap();
|
||||
echo $PAGE->requires->js_function_call('lockoptions_timefromitems')->asap();
|
||||
|
||||
print_simple_box_end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user