Commit dc08f69b authored by Romain Loth's avatar Romain Loth

make captcha optional

parent 123c5b92
...@@ -46,7 +46,9 @@ cmxClt = (function(cC) { ...@@ -46,7 +46,9 @@ cmxClt = (function(cC) {
cC.uauth.realCaptchaLength = 5 cC.uauth.realCaptchaLength = 5
// captcha init // captcha init
$(cmxClt.uauth.captcha).realperson({length: cC.uauth.realCaptchaLength}) if (cC.uauth.captcha) {
$(cmxClt.uauth.captcha).realperson({length: cC.uauth.realCaptchaLength})
}
// captchaHash should be appended by itself if normal submit, // captchaHash should be appended by itself if normal submit,
// but otherwise we need to do it ourselves with collectCaptcha() // but otherwise we need to do it ourselves with collectCaptcha()
...@@ -78,8 +80,11 @@ cmxClt = (function(cC) { ...@@ -78,8 +80,11 @@ cmxClt = (function(cC) {
cC.uauth.checkPassFormat() cC.uauth.checkPassFormat()
} }
// finally also update cC.uauth.captchaStatus // finally also update cC.uauth.captchaStatus if captcha present
cC.uauth.captchaStatus = (cC.uauth.captcha.value.length == cC.uauth.realCaptchaLength) cC.uauth.captchaStatus = (
!cC.uauth.captcha
|| (cC.uauth.captcha.value.length == cC.uauth.realCaptchaLength)
)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment