Skip to content

Commit

Permalink
Merge pull request #2727 from QuizandSurveyMaster/CU-86cx6a1zk-Fix-ca…
Browse files Browse the repository at this point in the history
…ptcha-issues-on-rtl-site

Fix captcha issues
  • Loading branch information
zubairraeen authored Nov 28, 2024
2 parents 5cdd366 + d92ba8e commit 0a9eb06
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1876,12 +1876,14 @@ jQuery(document).ready(function () {
mlw_code += mlw_chars.substring(rnum, rnum + 1);
}
var mlw_captchaCTX = document.getElementById('mlw_captcha').getContext('2d');
mlw_captchaCTX.font = 'normal 24px Verdana';
mlw_captchaCTX.strokeStyle = '#000000';
mlw_captchaCTX.clearRect(0, 0, 100, 50);
mlw_captchaCTX.strokeText(mlw_code, 10, 30, 70);
mlw_captchaCTX.textBaseline = 'middle';
document.getElementById('mlw_code_captcha').value = mlw_code;
mlw_captchaCTX.direction = 'rtl';
mlw_captchaCTX.font = 'normal 24px Verdana';
mlw_captchaCTX.strokeStyle = '#000000';
mlw_captchaCTX.clearRect(0, 0, 100, 50);
mlw_captchaCTX.textAlign = 'right';
mlw_captchaCTX.textBaseline = 'middle';
mlw_captchaCTX.strokeText(mlw_code, 90, 25);
document.getElementById('mlw_code_captcha').value = mlw_code;
}
});

Expand Down

0 comments on commit 0a9eb06

Please sign in to comment.