<%@ page extends="oneit.servlets.jsp.JSPInclude" %>

<%@ include file="/setuprequest.jsp" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>

<oneit:dynIncluded>

    <script type="text/javascript">
        $(document.body).addClass('bg-color');

        $(document).ready(function() {
            validate();
            $('input').on('change keyup', function() { validate() });
        });

        function validate() {
            var empty = false;
            $('input[required]').each(function() {
                if ( $.trim($( this ).val()) === '') {
                    empty = true;
                    if ($( this ).css('background-color') === 'rgb(250, 255, 189)') {
                       empty = false;
                    }
                }
            });

            if (empty) {
                $('.send-btn').attr('disabled', 'disabled');
            } else {
                $('.send-btn').removeAttr('disabled');
            }
        }
    </script>
    <style>
        button[disabled] {
            opacity: 0.6;
            background-color: #0582ba;
        }
    </style>
    <div class="main-verify-identity">
        <div class="login-logo"><img src="<%= request.getContextPath() %>/images/logo.svg" /></div>
        <oneit:form name="forgotPassword"    method="post">
            <oneit:dynInclude   page="/extensions/applicantportal/inc/multifieldtext.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
            <div class="main-box-layout login-box">
                <div class="text-left">
                    <p>
                        Enter your email address below. If we find a matching account, then you'll receive an email with a password reset link.
                    </p>
                </div>
                <div>&nbsp;</div>
                <div class="form-group text-left">
                    <label>Email Address</label>
                    <input type="email"  class="form-control"   name="email"    required>
                </div>

                <div class="form-group">
                    <oneit:button   value="Send"    name="forgotPassword"   cssClass="box-btn send-btn"
                                    requestAttribs="<%= CollectionUtils.mapEntry("nextPage", WebUtils.getSamePageInRenderMode(request, "ResetPasswordSent"))
                                                                        .mapEntry ("restartProcess", Boolean.TRUE)
                                                                        .mapEntry ("attribNamesToRestore", Collections.singleton("Job"))
                                                                        .toMap() %>"/>
                </div>
            </div>
        </oneit:form>
    </div>
</oneit:dynIncluded>