Gazelle/static/functions/form_validate.js

39 lines
798 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;
2013-07-16 08:00:49 +00:00
case "requests":
if (query['action'] == "new") {
$("#request_form").preventDoubleSubmission();
}
break;
2013-07-28 08:00:53 +00:00
case "sitehistory":
if (query['action'] == "edit") {
$("#event_form").validate();
}
break;
2013-06-27 08:01:06 +00:00
default:
break;
}
});