Last active
August 29, 2015 14:24
-
-
Save amusarra/55b971f083251cbc0f2f to your computer and use it in GitHub Desktop.
Hook recaptcha theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Captcha | |
## | |
# | |
# reCAPTCHA | |
# | |
# | |
# Configuration thema reCaptcha for siteid | |
# You can see the use of the configuration parameter on | |
# html\taglib\ui\captcha\recaptcha.jsp | |
# | |
captcha.engine.recaptcha.theme[11905]=clean | |
captcha.engine.recaptcha.theme[10182]=white |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- | |
/** | |
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. | |
* | |
* This library is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation; either version 2.1 of the License, or (at your option) | |
* any later version. | |
* | |
* This library is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | |
* details. | |
*/ | |
--%> | |
<%@ include file="/html/taglib/ui/captcha/init.jsp" %> | |
<noscript> | |
<iframe frameborder="0" height="300" src="<%= HttpUtil.protocolize(PropsValues.CAPTCHA_ENGINE_RECAPTCHA_URL_NOSCRIPT, request.isSecure()) %><%= PrefsPropsUtil.getString(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC, PropsValues.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC) %>" width="500"></iframe><br /> | |
<textarea cols="40" name="recaptcha_challenge_field" rows="3"></textarea> | |
<input name="recaptcha_response_field" type="hidden" value="manual_challenge" /> | |
</noscript> | |
<aui:script position="inline"> | |
var RecaptchaOptions = { | |
lang : '<%= locale.getLanguage() %>', | |
theme : '<%=(Validator.isNotNull(PropsUtil.get("captcha.engine.recaptcha.theme", new Filter(Long.toString(themeDisplay.getScopeGroupId()))))) ? PropsUtil.get("captcha.engine.recaptcha.theme", new Filter(Long.toString(themeDisplay.getScopeGroupId()))) : "white" %>' | |
}; | |
</aui:script> | |
<script src="<%= HttpUtil.protocolize(PropsValues.CAPTCHA_ENGINE_RECAPTCHA_URL_SCRIPT, request.isSecure()) %><%= PrefsPropsUtil.getString(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC, PropsValues.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC) %>" type="text/javascript"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment