Removed unwanted code and add bootstrap-validator cdn js

This commit is contained in:
Mondi Geetha 2017-07-01 17:59:34 +05:30
parent 36877d613d
commit afcec7eb03

View file

@ -60,53 +60,5 @@
<script src="{% static 'datacenterlight/js/form.js' %}"></script> <script src="{% static 'datacenterlight/js/form.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.validator.setDefaults({
ignore: []
});
var name_message = "{% trans 'Please enter your name' %}";
var email_message = "{% trans 'Please enter a valid email address' %}";
$('#order_form').validate({
wrapper: 'div',
errorLabelContainer: "#error_message_box",
rules: {
name: {
required: true,
minlength: 3
},
email: {
required: true,
email: true
}
},
messages: {
name: name_message,
email: email_message
},
submitHandler: function (form) {
return true;
}
});
});
// window.onload=function(){
// $('.selectpicker').selectpicker({
// style: 'btn-link',
// windowPadding: 10,
// });
// var hash = window.location.hash.substr(1);
// console.log(hash);
// if (hash == 'requestform'){
// $('#reques-success-message').modal('show');
// }
// };
</script>
</html> </html>