Skip to content

Instantly share code, notes, and snippets.

@leonciocaminha
Created April 22, 2016 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leonciocaminha/ca8ba1eba588bd20315eb068baf77638 to your computer and use it in GitHub Desktop.
Save leonciocaminha/ca8ba1eba588bd20315eb068baf77638 to your computer and use it in GitHub Desktop.
# --
# Copyright (C) 2001-2015 OTRS AG, http://otrs.com/
# --
# 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.
# --
[% InsertTemplate("CustomerHeader.tt") %]
<!-- start login -->
<link rel="stylesheet" media="all" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style media="screen">
.form-signin
{
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading, .form-signin .checkbox
{
margin-bottom: 10px;
}
.form-signin .checkbox
{
font-weight: normal;
}
.form-signin .form-control
{
position: relative;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus
{
z-index: 2;
}
.form-signin input[type="text"]
{
margin-bottom: -1px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-signin input[type="password"]
{
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.account-wall
{
margin-top: 20px;
padding: 40px 0px 20px 0px;
background-color: #f7f7f7;
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.login-title
{
color: #555;
font-size: 18px;
font-weight: 400;
display: block;
}
.profile-img
{
width: 96px;
height: 96px;
margin: 0 auto 10px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
.need-help
{
margin-top: 10px;
}
.new-account
{
display: block;
margin-top: 10px;
}
</style>
<div id="MainBox" class="Login ARIARoleMain">
[% RenderBlockStart("Message") %]
<div class="[% IF Data.MessageType == 'Success' %]SuccessBox[% ELSE %]ErrorBox[% END %]"><span>[% Data.Message | html %]</span></div>
[% RenderBlockEnd("Message") %]
<noscript>
<div id="NoJavaScript">
<h2>[% Translate("JavaScript Not Available") | html %]</h2>
<p>
[% Translate("In order to experience OTRS, you'll need to enable JavaScript in your browser.") | html %]
</p>
</div>
</noscript>
<div class="Hidden" id="OldBrowser">
<h2 class="Center">[% Translate("Browser Warning") | html %]</h2>
<p>
[% Translate("The browser you are using is too old.") | html %]
[% Translate("OTRS runs with a huge lists of browsers, please upgrade to one of these.") | html %]
[% Translate("Please see the documentation or ask your admin for further information.") | html %]
</p>
</div>
[% RenderBlockStart("SystemMaintenance") %]
<div class="WarningBox WithIcon">
<i class="fa fa-exclamation-circle"></i> [% Translate(Data.LoginMessage) | html %]
</div>
[% RenderBlockEnd("SystemMaintenance") %]
<div id="Slider">
<div id="SlideArea">
[% RenderBlockStart("PreLogin") %]
<div id="PreLogin">
<p>[% Translate("One moment please, you are being redirected...") | html %]</p>
<form 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="[% Data.RequestedURL | html %]"/>
<input type="hidden" name="Lang" value="[% Env("UserLanguage") | html %]"/>
<input type="hidden" name="TimeOffset" id="TimeOffset" value=""/>
</form>
</div>
[% RenderBlockEnd("PreLogin") %]
[% RenderBlockStart("LoginBox") %]
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h2>[% Translate("Login") | html %]</h2>
<div class="account-wall">
</div>
</div>
</div>
<form class="form-signin" 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="[% Data.RequestedURL | html %]"/>
<input type="hidden" name="Lang" value="[% Env("UserLanguage") | html %]"/>
<input type="hidden" name="TimeOffset" id="TimeOffset" value=""/>
<input autocorrect="off" autocapitalize="off" title="[% Translate("Your user name") | html %]" class="form-control" type="text" name="User" id="User" maxlength="150" placeholder="[% Translate("User name") | html %]" />
<input title="[% Translate("Your password") | html %]" type="password" class="form-control" name="Password" id="Password" placeholder="[% Translate("Password") | html %]" />
<button type="submit" class="btn btn-lg btn-success btn-block" value="[% Translate("Log In") | html %]" disabled="disabled">[% Translate("Log In") | html %]</button>
[% RenderBlockStart("LostPasswordLink") %]
<div class="Option">
<a href="#Reset" id="ForgotPassword">[% Translate("Forgot password?") | html %]</a>
</div>
[% RenderBlockEnd("LostPasswordLink") %]
<div class="Clear"></div>
</form>
[% RenderBlockStart("CreateAccountLink") %]
<p>[% Translate("Not yet registered?") | html %] <a href="#Signup">[% Translate("Sign up now") | html %]</a>.</p>
[% RenderBlockEnd("CreateAccountLink") %]
</div>
[% RenderBlockEnd("LoginBox") %]
[% RenderBlockStart("LostPassword") %]
<div id="Reset">
<a href="#Login" class="InlineNavigation">&larr; [% Translate("Back") | html %]</a>
<h2>[% Translate("Request new password") | html %]</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") | html %]" />
<div>
<label for="ResetUser">[% Translate("User name") | html %]</label>
<input title="[% Translate("Your User Name") | html %]" type="text" id="ResetUser" name="User" maxlength="150" />
</div>
<div>
<button type="submit" value="[% Translate("Submit") | html %]" disabled="disabled">[% Translate("Submit") | html %]</button>
</div>
<div class="Clear"></div>
</form>
<p>[% Translate("A new password will be sent to your email address.") | html %]</p>
</div>
[% RenderBlockEnd("LostPassword") %]
[% RenderBlockStart("CreateAccount") %]
<div id="Signup">
<a href="#Login" class="InlineNavigation">&larr; [% Translate("Back") | html %]</a>
<h2>[% Translate("Create Account") | html %]</h2>
<p>[% Translate("Please fill out this form to receive login credentials.") | html %]</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") | html %]"/>
<div>
<label for="Title">[% Translate("Title") | html %]</label>
<input title="[% Translate("How we should address you") | html %]" type="text" name="Title" id="Title" maxlength="50" value="[% Data.UserTitle | html %]"/>
</div>
<div class="NewLine">
<label class="Mandatory" for="FirstName"><span class="Marker">*</span> [% Translate("Firstname") | html %]</label>
<input title="[% Translate("Your First Name") | html %]" name="Firstname" type="text" id="FirstName" maxlength="100" value="[% Data.UserFirstname | html %]" class="W50pc Validate_Required"/>
<div id="FirstNameError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="NewLine">
<label class="Mandatory" for="LastName"><span class="Marker">*</span> [% Translate("Lastname") | html %]</label>
<input title="[% Translate("Your Last Name") | html %]" name="Lastname" type="text" id="LastName" maxlength="100" value="[% Data.UserLastname | html %]" class="W50pc Validate_Required"/>
<div id="LastNameError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="NewLine">
<label class="Mandatory" for="Email"><span class="Marker">*</span> [% Translate("Email") | html %]</label>
<input title="[% Translate("Your email address (this will become your username)") | html %]" name="Email" type="[% Env("EmailFieldType") | html %]" id="Email" maxlength="150" value="[% Data.UserEmail | html %]" class="W100pc Validate_Required Validate_Email"/>
<div id="EmailError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
</div>
<div class="NewLine">
<button id="CreateAccount" type="submit" value="[% Translate("Create") | html %]" disabled="disabled">[% Translate("Create") | html %]</button>
</div>
<div class="Clear"></div>
</form>
</div>
[% RenderBlockEnd("CreateAccount") %]
<div class="Clear"></div>
</div> <!-- /SlideArea -->
</div>
</div>
<!-- stop login -->
[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">//<![CDATA[
Core.Customer.Login.Init({LastLoginFailed: '[% Data.LoginFailed %]'});
[% RenderBlockStart("SignupError") %]
window.location.hash = 'Signup';
[% RenderBlockEnd("SignupError") %]
//]]></script>
[% END %]
[% InsertTemplate("CustomerFooter.tt") %]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment