-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_category.php
43 lines (35 loc) · 1.33 KB
/
add_category.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php include('session.php'); ?>
<?php $selectedMenu = "category"; ?>
<?php include('templates/common/menubar.php'); ?>
<script src="assets/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.validate.min.js"></script>
<script type="text/javascript">
(function($,W,D) {
var JQUERY4U = {};
JQUERY4U.UTIL = {
setupFormValidation: function() {
//form validation rules
$("#form-validation").validate({
rules: {
category_name : "required",
category_image : "required"
},
messages: {
category_name : "Please fill out this field!",
category_image : "Please fill out this field!"
},
errorElement : 'div',
submitHandler: function(form) {
form.submit();
}
});
}
}
//when the dom has loaded setup form validation rules
$(D).ready(function($) {
JQUERY4U.UTIL.setupFormValidation();
});
})(jQuery, window, document);
</script>
<?php include('templates/add_category_form.php'); ?>
<?php include('templates/common/footer.php'); ?>