| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.Security.EscapeOutput.HeredocOutputNotEscaped, PluginCheck.CodeAnalysis.Heredoc -- PFBC framework extension, HTML output is controlled | |
| 3 | 2 | class AccuaForm_Element_Captcha2 extends Element { |
| 4 | 3 | protected $privateKey = ""; |
| 5 | 4 | protected $publicKey = ""; |
| 6 | 5 | |
| @@ -8,9 +7,9 @@ | ||
| 8 | 7 | if ($properties === null && is_array($unused)) { |
| 9 | 8 | $properties = $unused; |
| 10 | 9 | } |
| 11 | 10 | parent::__construct($label, "recaptcha_response_field", $properties); |
| 12 | - $validator = new AccuaForm_Validation_Captcha2b(__("The reCAPTCHA response provided was incorrect. Please retry.", 'contact-forms')); | |
| 11 | + $validator = new AccuaForm_Validation_Captcha2b(__("The reCATPCHA response provided was incorrect. Please re-try.", 'contact-forms')); | |
| 13 | 12 | $validator->configure(array('privateKey'=>$this->privateKey)); |
| 14 | 13 | $this->setValidation($validator); |
| 15 | 14 | } |
| 16 | 15 | |
| @@ -17,9 +16,9 @@ | ||
| 17 | 16 | public function render() { |
| 18 | 17 | $js_lang = _accua_forms_json_encode($this->form->getLanguage()); |
| 19 | 18 | $js_field_id = _accua_forms_json_encode($this->attributes["id"]);//$this->form->attributes['id'] per id del form |
| 20 | 19 | $js_publicKey = _accua_forms_json_encode($this->publicKey); |
| 21 | - $js_path = _accua_forms_json_encode(ACCUA_FORMS_DIR_URL . 'assets/js/frontend/recaptcha2.js'); | |
| 20 | + $js_path = _accua_forms_json_encode(ACCUA_FORMS_DIR_URL . 'accua-recaptcha2.js'); | |
| 22 | 21 | |
| 23 | 22 | $field_id = htmlspecialchars($this->attributes["id"], ENT_QUOTES); |
| 24 | 23 | echo <<<EOT |
| 25 | 24 | <script type="text/javascript"> |