Gazelle/static/functions/form_validate.js

29 lines
573 B
JavaScript
Raw Normal View History

2013-06-27 08:01:06 +00:00
$(document).ready(function() {
2013-07-01 08:01:00 +00:00
var url = new URL();
var query = url.query;
2013-07-02 08:01:37 +00:00
switch (url.path) {
2013-06-27 08:01:06 +00:00
case "forums":
if (query['action'] == "new") {
$("#newthreadform").validate();
}
break;
case "reports":
if (query['action'] == "report") {
$("#report_form").validate();
}
break;
case "inbox":
if (query['action'] == "viewconv" || query['action'] == "compose") {
$("#messageform").validate();
}
break;
case "user":
if (query['action'] == "notify") {
$("#filter_form").validate();
}
break;
default:
break;
}
});