Subversion Repositories oidplus

Rev

Rev 1022 | Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1022 Rev 1050
Line 15... Line 15...
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
if (!defined('INSIDE_OIDPLUS')) die();
20
namespace ViaThinkSoft\OIDplus;
21
 
21
 
22
class OIDplusCaptchaPluginRecaptcha extends OIDplusCaptchaPlugin {
22
class OIDplusCaptchaPluginRecaptcha extends OIDplusCaptchaPlugin {
23
 
23
 
24
        /*public*/ const RECAPTCHA_V2_CHECKBOX  = 1;
24
        /*public*/ const RECAPTCHA_V2_CHECKBOX  = 1;
25
        /*public*/ const RECAPTCHA_V2_INVISIBLE = 2;
25
        /*public*/ const RECAPTCHA_V2_INVISIBLE = 2;
Line 98... Line 98...
98
 
98
 
99
        public static function setupHTML(): string {
99
        public static function setupHTML(): string {
100
                return '<div id="CAPTCHAPLUGIN_PARAMS_RECAPTCHA">'.
100
                return '<div id="CAPTCHAPLUGIN_PARAMS_RECAPTCHA">'.
101
                       '<p>(<a href="https://developers.google.com/recaptcha/intro" target="_blank">'._L('more information and obtain key').'</a>)</p>'.
101
                       '<p>(<a href="https://developers.google.com/recaptcha/intro" target="_blank">'._L('more information and obtain key').'</a>)</p>'.
102
                       '<p>'._L('reCAPTCHA Version').'<br><select id="recaptcha_version">'.
102
                       '<p>'._L('reCAPTCHA Version').'<br><select id="recaptcha_version">'.
-
 
103
                       // Note: JavaScript will add "\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::" in front of the name
103
                       '    <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX">reCAPTCHA V2 Checkbox</option>'.
104
                       '    <option name="RECAPTCHA_V2_CHECKBOX">reCAPTCHA V2 Checkbox</option>'.
104
                       '    <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_INVISIBLE">reCAPTCHA V2 Invisible</option>'.
105
                       '    <option name="RECAPTCHA_V2_INVISIBLE">reCAPTCHA V2 Invisible</option>'.
105
                       '    <option name="OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V3">reCAPTCHA V3</option>'.
106
                       '    <option name="RECAPTCHA_V3">reCAPTCHA V3</option>'.
106
                       '</select></p>'.
107
                       '</select></p>'.
107
                       '<p>'._L('reCAPTCHA Public key').'<br><input id="recaptcha_public" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_public_warn"></span></p>'.
108
                       '<p>'._L('reCAPTCHA Public key').'<br><input id="recaptcha_public" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_public_warn"></span></p>'.
108
                       '<p>'._L('reCAPTCHA Private key').'<br><input id="recaptcha_private" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_private_warn"></span></p>'.
109
                       '<p>'._L('reCAPTCHA Private key').'<br><input id="recaptcha_private" type="text" onkeypress="rebuild()" onkeyup="rebuild()"> <span id="recaptcha_private_warn"></span></p>'.
109
                       '</div>';
110
                       '</div>';
110
        }
111
        }