# --
# CustomerLogin.dtl - provides customer HTML login screen
# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
# --
# $Id: CustomerLogin.dtl,v 1.68 2013/01/10 13:13:10 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
#
# HTTP headers
# With this X-Header, Core.AJAX can recognize that the AJAX request returned the login page (session timeout) and perform a redirect.
X-OTRS-Login: $Env{"Baselink"}
$Include{"CustomerHeader"}

<!-- start login -->
<div id="MainBox" class="Login ARIARoleMain">
<!-- dtl:block:Message -->
    <div class="ErrorBox"><span>$Text{"$Data{"Message"}"}</span></div>
<!-- dtl:block:Message -->
    <noscript>
    <div id="NoJavaScript">
        <h2>$Text{"JavaScript Not Available"}</h2>
        <p>
            $Text{"In order to experience OTRS, you'll need to enable JavaScript in your browser."}
        </p>
    </div>
    </noscript>
    <div class="Hidden" id="OldBrowser">
        <h2 class="Center">$Text{"Browser Warning"}</h2>
        <p>
            $Text{"The browser you are using is too old."}
            $Text{"OTRS runs with a huge lists of browsers, please upgrade to one of these."}
            $Text{"Please see the documentation or ask your admin for further information."}
        </p>
    </div>
    <div id="Slider">
        <div id="SlideArea">
            <div id="Login">
                <h2>$Text{"Login"}</h2>
                <form class="Floating" action="$Env{"CGIHandle"}" method="post" enctype="application/x-www-form-urlencoded" name="login">
                    <input type="hidden" name="Action" value="Login"/>
                    <input type="hidden" name="RequestedURL" value="$QData{"RequestedURL"}"/>
                    <input type="hidden" name="Lang" value="$Env{"UserLanguage"}"/>
                    <input type="hidden" name="TimeOffset" id="TimeOffset" value=""/>
                    <div>
                        <label for="User">$Text{"User name"}</label>
                        <input title="$Text{"Your user name"}" type="text" name="User" id="User" maxlength="150" />
                    </div>
                    <div>
                        <label for="Password">$Text{"Password"}</label>
                        <input title="$Text{"Your password"}" type="password" name="Password" id="Password" />
<!-- dtl:block:LostPasswordLink -->
                        <div class="Option">
                            <a href="#Reset" id="ForgotPassword">$Text{"Forgot password?"}</a>
                        </div>
<!-- dtl:block:LostPasswordLink -->
                    </div>
                    <div>
                        <button type="submit" value="$Text{"Log In"}" disabled="disabled">$Text{"Log In"}</button>
                    </div>
                    <div class="Clear"></div>
                </form>
<!-- dtl:block:CreateAccountLink -->
                <p>$Text{"Not yet registered?"} <a href="#Signup">$Text{"Sign up now"}</a>.</p>
<!-- dtl:block:CreateAccountLink -->
            </div>
<!-- dtl:block:LostPassword -->
            <div id="Reset">
                <a href="#Login" class="InlineNavigation">&larr; $Text{"Back"}</a>
                <h2>$Text{"Request new password"}</h2>
                <form class="Floating" action="$Env{"CGIHandle"}" method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="Action" value="CustomerLostPassword" />
                    <input type="hidden" name="Lang" value="$Env{"UserLanguage"}" />
                    <div>
                        <label for="ResetUser">$Text{"User name"}</label>
                        <input title="$Text{"Your User Name"}" type="text" id="ResetUser" name="User" maxlength="150" />
                    </div>
                    <div>
                        <button type="submit" value="$Text{"Submit"}"disabled="disabled">$Text{"Submit"}</button>
                    </div>
                    <div class="Clear"></div>
                </form>
                <p>$Text{"A new password will be sent to your email address."}</p>
            </div>
<!-- dtl:block:LostPassword -->
<!-- dtl:block:CreateAccount -->
            <div id="Signup">
                <a href="#Login" class="InlineNavigation">&larr; $Text{"Back"}</a>
                <h2>$Text{"Create Account"}</h2>
                <p>$Text{"Please fill out this form to receive login credentials."}</p>
                <form class="Floating Validate" action="$Env{"CGIHandle"}" method="post" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="Action" value="CustomerCreateAccount"/>
                    <input type="hidden" name="Lang" value="$Env{"UserLanguage"}"/>
                    <div>
                        <label for="Title">$Text{"Title{CustomerUser}"}</label>
                        <input title="$Text{"How we should address you"}" type="text" name="Title"  id="Title" maxlength="50" value="$QData{"UserTitle"}"/>
                    </div>
                    <div class="NewLine">
                        <label class="Mandatory" for="FirstName"><span class="Marker">*</span> $Text{"Firstname{CustomerUser}"}</label>
                        <input title="$Text{"Your First Name"}" name="Firstname" type="text" id="FirstName" maxlength="100" value="$QData{"UserFirstname"}" class="W50pc Validate_Required"/>
                        <div id="FirstNameError" class="TooltipErrorMessage"><p>$Text{"Please supply a first name"}</p></div>
                    </div>
                    <div class="NewLine">
                        <label class="Mandatory" for="LastName"><span class="Marker">*</span> $Text{"Lastname{CustomerUser}"}</label>
                        <input title="$Text{"Your Last Name"}" name="Lastname" type="text" id="LastName" maxlength="100" value="$QData{"UserLastname"}" class="W50pc Validate_Required"/>
                        <div id="LastNameError" class="TooltipErrorMessage"><p>$Text{"Please supply a last name"}</p></div>
                    </div>
                    <div class="NewLine">
                        <label class="Mandatory" for="Email"><span class="Marker">*</span> $Text{"Email{CustomerUser}"}</label>
                        <input title="$Text{"Your email address (this will become your username)"}" name="Email" type="$QEnv{"EmailFieldType"}" id="Email" maxlength="150" value="$QData{"UserEmail"}" class="W100pc Validate_Required Validate_Email"/>
                        <div id="EmailError" class="TooltipErrorMessage"><p>$Text{"Please supply a"} $Text{"Email{CustomerUser}"}</p></div>
                    </div>
                    <div class="NewLine">
                        <button id="CreateAccount" type="submit" value="$Text{"Create"}" disabled="disabled">$Text{"Create"}</button>
                    </div>
                    <div class="Clear"></div>
                </form>
            </div>
<!-- dtl:block:CreateAccount -->
            <div class="Clear"></div>
        </div> <!-- /SlideArea -->
    </div>
</div>
<!-- stop login -->

<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
Core.Customer.Login.Init({LastLoginFailed: '$Data{"LoginFailed"}'});

<!-- dtl:block:SignupError -->
window.location.hash = 'Signup';
<!-- dtl:block:SignupError -->
//]]></script>
<!-- dtl:js_on_document_complete -->

$Include{"CustomerFooter"}
