Commit 59b754c6 authored by Matija Obreza's avatar Matija Obreza

Introducing <local:captcha tag

parent 56ca1ddf
......@@ -54,7 +54,7 @@
<div class="form-group">
<label class="col-lg-2 control-label"><spring:message code="captcha.text" /></label>
<div class="col-lg-3">
<%@ include file="/WEB-INF/jsp/recaptcha/here.jsp" %>
<local:captcha siteKey="${captchaSiteKey}" />
</div>
</div>
<div class="form-group">
......
......@@ -33,7 +33,7 @@
<div class="form-group">
<label class="col-lg-3 control-label"><spring:message code="captcha.text" /></label>
<div class="col-lg-9">
<%@ include file="/WEB-INF/jsp/recaptcha/here.jsp" %>
<local:captcha siteKey="${captchaSiteKey}" />
</div>
</div>
</security:authorize>
......
......@@ -21,7 +21,7 @@
<div class="form-group">
<label class="col-lg-2 control-label"><spring:message code="captcha.text" /></label>
<div class="col-lg-3">
<%@ include file="/WEB-INF/jsp/recaptcha/here.jsp" %>
<local:captcha siteKey="${captchaSiteKey}" />
</div>
</div>
<div class="form-group">
......
<%-- Bad, bad... Injecting scripts all over the HTTPS --%>
<%@ tag description="Display Google recaptcha" pageEncoding="UTF-8"%>
<%@ tag body-content="empty"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ attribute name="siteKey" required="true" type="java.lang.String"%>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div class="g-recaptcha" data-sitekey="${captchaSiteKey}"></div>
<div class="g-recaptcha" data-sitekey="${siteKey}"></div>
<noscript>
<div style="width: 302px; height: 422px;">
<div style="width: 302px; height: 422px; position: relative;">
<div style="width: 302px; height: 422px; position: absolute;">
<iframe src="https://www.google.com/recaptcha/api/fallback?k=${captchaSiteKey}"
frameborder="0" scrolling="no"
style="width: 302px; height:422px; border-style: none;">
</iframe>
<iframe src="https://www.google.com/recaptcha/api/fallback?k=${siteKey}" frameborder="0" scrolling="no" style="width: 302px; height: 422px; border-style: none;"> </iframe>
</div>
<div style="width: 300px; height: 60px; border-style: none;
bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;
background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
<textarea id="g-recaptcha-response" name="g-recaptcha-response"
class="g-recaptcha-response"
style="width: 250px; height: 40px; border: 1px solid #c1c1c1;
margin: 10px 25px; padding: 0px; resize: none;" >
</textarea>
<div style="width: 300px; height: 60px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
<textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"></textarea>
</div>
</div>
</div>
</noscript>
\ No newline at end of file
</noscript>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment