<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="sptemplate" tagdir="/WEB-INF/tags/addons/b2bacceleratoraddon/responsive/secureportal/sptemplate" %>
<%@ taglib prefix="spuser" tagdir="/WEB-INF/tags/addons/b2bacceleratoraddon/responsive/secureportal/spuser" %>
<%@ taglib prefix="ycommerce" uri="http://hybris.com/tld/ycommercetags"%>
<%@ taglib prefix="fragments" tagdir="/WEB-INF/tags/addons/braintreeb2baddon/responsive/login"%>

<fragments:connectWithPayPalSecurityLayerCancelPopup />
<spring:url value="/" var="homeUrl"/>

<sptemplate:page pageTitle="${pageTitle}">
    <jsp:body>
    	<div id="connect-with-paypal-security-layer-page" class="container">

            <legend><spring:message code="braintree.paypal.connect.security.layer.header.message"
                                    arguments="${[baseSiteName, userEmail]}"/></legend>

            <form:form action="${homeUrl}/paypal/connect/verify-password/j_spring_security_check" method="POST">
                <input type="hidden" name="j_username" value="${userEmail}"/>
                <label class="control-label " for="j_password">Password: </label>
                <input type="password" name="j_password" id="j_password" class="form-control"/>
                <div class="mt-20px">
                    <button id="confirm-button" data-theme="b" type="submit" class="btn btn-default btn-block" onClick='ACC.connectWithPayPalPage.onASLSubmitClick()'>
                        <spring:message code="braintree.text.confirm"/>
                    </button>
                    <button id="connect-with-paypal-security-layer-cancel-button" data-theme="b" type="button" class="btn btn-primary btn-block">
                        <spring:message code="braintree.text.cancel"/>
                    </button>
                    <div class="forgotten-password">
                        <ycommerce:testId code="login_forgotPassword_link">
                            <a href="#" data-link="<c:url value='/login/pw/request'/>" class="js-password-forgotten"
                               data-cbox-title="<spring:theme code="forgottenPwd.title"/>">
                                <spring:theme code="login.link.forgottenPwd"/>
                            </a>
                        </ycommerce:testId>
                    </div>
                </div>
            </form:form>

        </div>
    </jsp:body>
</sptemplate:page>