<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">

<f:flashMessages/>
<f:if condition="{cookieWarning}">
    <f:render partial="CookieWarning"/>
</f:if>

<f:if condition="{messageKey}">
    <h3>
        <f:render partial="RenderLabelOrMessage" arguments="{key: '{messageKey}_header'}"/>
    </h3>
    <p>
        <f:render partial="RenderLabelOrMessage" arguments="{key: '{messageKey}_message'}"/>
    </p>
</f:if>
<f:if condition="{onSubmit}">
    <f:then>
        <f:form target="_top" fieldNamePrefix="" action="login" onsubmit="{onSubmit}">
            <f:render section="content" arguments="{_all}"/>
        </f:form>
    </f:then>
    <f:else>
        <f:form target="_top" fieldNamePrefix="" action="login">
            <f:render section="content" arguments="{_all}"/>
        </f:form>
    </f:else>
</f:if>

<f:if condition="{settings.showForgotPassword}">
    <f:link.action action="recovery" controller="PasswordRecovery">
        <f:render partial="RenderLabelOrMessage" arguments="{key: 'forgot_header'}"/>
    </f:link.action>
</f:if>

<f:section name="content">
    <fieldset class="form-group">
        <legend class="col-form-label"><h3><f:translate key="login"/></h3></legend>
        <div class="form-group">
            <label for="user">
                <f:translate key="username"/>
            </label>
            <f:form.textfield name="user" id="user" class="form-control"/>
        </div>
        <div class="form-group">
            <label for="pass">
                <f:translate key="password"/>
            </label>
            <f:form.password name="pass" id="pass" class="form-control" data="{rsa-encryption: ''}"/>
        </div>

        <f:if condition="{permaloginStatus} > -1">
            <div class="form-group form-check">
                <f:if condition="{permaloginStatus} == 1">
                    <f:then>
                        <f:form.hidden name="permalogin" value="0" additionalAttributes="{disabled: 'disabled'}"/>
                        <f:form.checkbox name="permalogin" id="permalogin" value="1" checked="checked" class="form-check-input"/>
                    </f:then>
                    <f:else>
                        <f:form.hidden name="permalogin" value="0"/>
                        <f:form.checkbox name="permalogin" id="permalogin" value="1" class="form-check-input"/>
                    </f:else>
                </f:if>
                <label class="form-check-label" for="permalogin">
                    <f:translate id="permalogin"/>
                </label>
            </div>
        </f:if>

        <div class="form-group">
            <f:form.submit value="{f:translate(key: 'login')}" name="submit" class="btn btn-primary"/>
        </div>

        <div class="felogin-hidden">
            <f:form.hidden name="logintype" value="login"/>
            <f:form.hidden name="pid" value="{storagePid}"/>
            <f:if condition="{redirectURL}!=''">
                <f:form.hidden name="redirect_url" value="{redirectURL}"/>
            </f:if>
            <f:if condition="{referer}!=''">
                <f:form.hidden name="referer" value="{referer}"/>
            </f:if>
            <f:if condition="{redirectReferrer}!=''">
                <f:form.hidden name="redirectReferrer" value="off"/>
            </f:if>
            <f:if condition="{noRedirect}!=''">
                <f:form.hidden name="noredirect" value="1"/>
            </f:if>

            {extraHidden}
        </div>
    </fieldset>
</f:section>
</html>
