mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
Fix jquery Validation issue on setup
This commit is contained in:
27
www/include/jslibs/jquery-validation/demo/captcha/captcha.js
vendored
Normal file
27
www/include/jslibs/jquery-validation/demo/captcha/captcha.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
$(function(){
|
||||
$("#refreshimg").click(function(){
|
||||
$.post('newsession.php');
|
||||
$("#captchaimage").load('image_req.php');
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#captchaform").validate({
|
||||
rules: {
|
||||
captcha: {
|
||||
required: true,
|
||||
remote: "process.php"
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
captcha: "Correct captcha is required. Click the captcha to generate a new one"
|
||||
},
|
||||
submitHandler: function() {
|
||||
alert("Correct captcha!");
|
||||
},
|
||||
success: function(label) {
|
||||
label.addClass("valid").text("Valid captcha!")
|
||||
},
|
||||
onkeyup: false
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user