Skip to content

Commit

Permalink
Merge pull request #11 from thezenmonkey/patch-1
Browse files Browse the repository at this point in the history
Added Callback Function Check
  • Loading branch information
UndefinedOffset committed Aug 25, 2015
2 parents c6a08d3 + 323de91 commit 4d097a8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions javascript/NocaptchaField.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ var _noCaptchaFields=_noCaptchaFields || [];
function noCaptchaFieldRender() {
for(var i=0;i<_noCaptchaFields.length;i++) {
var field=document.getElementById('Nocaptcha-'+_noCaptchaFields[i]);
var options={'sitekey': field.getAttribute('data-sitekey'), 'theme': field.getAttribute('data-theme'), 'type': field.getAttribute('data-type')};
var options={
'sitekey': field.getAttribute('data-sitekey'),
'theme': field.getAttribute('data-theme'),
'type': field.getAttribute('data-type'),
'callback': (field.getAttribute('data-callback') ? verifyCallback : undefined )
};

grecaptcha.render(field, options);
}
}
}

0 comments on commit 4d097a8

Please sign in to comment.