array( array( 'type' => 'radio', 'label' => $this->l('Choose the type of reCAPTCHA'), 'name' => 'invisible_v2', 'default_value' => 0, 'values' => array( array( 'id' => 'invisible', 'value' => 0, 'label' => $this->l('Invisible reCAPTCHA, validate users in the background.')), array( 'id' => 'v2', 'value' => 1, 'label' => $this->l('reCAPTCHA V2, Validate users with the "I am not a robot" checkbox.')), ), 'validation' => 'isUnsignedInt', 'desc' => $this->l('Site key and secret key for them are different, which means if you want to change the type you will have to the change site key and secret key setting below.') ), array( 'type' => 'text', 'label' => $this->l('Site key:'), 'name' => 'site_key', 'validation' => 'isGenericName', 'desc' => $this->l(sprintf('How to get reCAPTCHA site key and secret key: %s', 'https://www.google.com/recaptcha/admin')) ), array( 'type' => 'text', 'label' => $this->l('Secret key:'), 'name' => 'secret_key', 'validation' => 'isGenericName', 'desc' => $this->l(sprintf('How to get reCAPTCHA site key and secret key: %s', 'https://www.google.com/recaptcha/admin')) ), 'form' => array( 'type' => 'checkbox', 'label' => $this->l('Enable Google reCAPTCHA for'), 'name' => 'form', 'default_value' => 1, 'values' => array( 'query' => array(), 'id' => 'id', 'name' => 'name' ), ), array( 'type' => 'switch', 'label' => $this->l('Disable all reCAPTCHAs when a user is logged in'), 'name' => 'logged_in', 'default_value' => 0, 'values' => array( array( 'id' => 'logged_in_1', 'value' => 1, 'label' => $this->l('YES')), array( 'id' => 'logged_in_0', 'value' => 0, 'label' => $this->l('NO')), ), 'validation' => 'isUnsignedInt', ), array( 'type' => 'switch', 'label' => $this->l('Show Google reCAPTCHA out when users start filling email field for newsletter subscription forms'), 'name' => 'news_delay', 'default_value' => 0, 'values' => array( array( 'id' => 'news_delay_1', 'value' => 1, 'label' => $this->l('YES')), array( 'id' => 'news_delay_0', 'value' => 0, 'label' => $this->l('NO')), ), 'validation' => 'isUnsignedInt', ), /*array( 'type' => 'text', 'label' => $this->l('Login attempts'), 'name' => 'login_attempts', 'desc' => $this->l('Amount of login attempts before captcha is shown. (0 = always)'), 'size' => 5, 'class' => 'fixed-width-xl', 'validation' => 'isUnsignedInt', ),*/ array( 'type' => 'radio', 'label' => $this->l('Google reCaptcha theme:'), 'name' => 'theme', 'default_value' => 'light', 'values' => array( array( 'id' => 'theme_light', 'value' => 'light', 'label' => $this->l('Light')), array( 'id' => 'theme_dark', 'value' => 'dark', 'label' => $this->l('Dark')), ), 'validation' => 'isGenericName', ), /*array( 'type' => 'radio', 'label' => $this->l('Google reCaptcha type:'), 'name' => 'type', 'default_value' => 'image', 'values' => array( array( 'id' => 'type_image', 'value' => 'image', 'label' => $this->l('image')), array( 'id' => 'type_audio', 'value' => 'audio', 'label' => $this->l('audio')), ), 'validation' => 'isGenericName', ),*/ array( 'type' => 'radio', 'label' => $this->l('Google reCaptcha size:'), 'name' => 'size', 'default_value' => 'normal', 'values' => array( array( 'id' => 'size_normal', 'value' => 'normal', 'label' => $this->l('Normal')), array( 'id' => 'size_compact', 'value' => 'compact', 'label' => $this->l('Compact')), ), 'validation' => 'isGenericName', 'desc' => $this->l('This setting works for Google reCAPTCHA V2 only.') ), array( 'type' => 'switch', 'label' => $this->l('Do not check captchas if it is not possible to connect with Google'), 'name' => 'no_connect', 'default_value' => 0, 'values' => array( array( 'id' => 'no_connect_1', 'value' => 1, 'label' => $this->l('YES')), array( 'id' => 'no_connect_0', 'value' => 0, 'label' => $this->l('NO')), ), 'validation' => 'isUnsignedInt', ), 'lang' => array( 'type' => 'select', 'label' => $this->l('Set a default language for languages which are not supported by Google reCAPTCHA:'), 'name' => 'lang', 'options' => array( 'query' => array(), 'id' => 'id', 'name' => 'name', 'default' => array( 'value' => 'en', 'label' => $this->l('English'), ), ), 'validation' => 'isGenericName', 'desc' => array( $this->l('This module will be shown in the same language as your shop by default.'), $this->l(sprintf('Google reCAPTCHA is available in 70+ languages %s', 'https://developers.google.com/recaptcha/docs/language')), ), ), ), 'submit' => array( 'title' => $this->l('Save'), ), ); $fields_form[1]['form'] = array( 'description' => $this->l(sprintf('Please contact us on the support forum %s if any reCAPTCHAs does not show out. We can provide help to adjust "jQuery selector" settings to make them show out for free.', 'https://www.sunnytoo.com/forums/forum/prestashop-modules')), 'input' => array( 'reset' => array( 'type' => 'html', 'id' => '', 'label' => $this->l('Reset settings for all forms below.'), 'name' => '', ), ), 'submit' => array( 'title' => $this->l('Save'), ), ); return $fields_form;