
<%
	/**
	 * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
	 *
	 * Permission is hereby granted, free of charge, to any person obtaining a copy
	 * of this software and associated documentation files (the "Software"), to deal
	 * in the Software without restriction, including without limitation the rights
	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	 * copies of the Software, and to permit persons to whom the Software is
	 * furnished to do so, subject to the following conditions:
	 *
	 * The above copyright notice and this permission notice shall be included in
	 * all copies or substantial portions of the Software.
	 *
	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
	 * SOFTWARE.
	 */
%>


<script type="text/javascript">
	
if(isMobileDevice())
		self.location = self.location = '../../login/mobileLogin.jsp';
	
</script>

<%@ include file="/html/portal/init.jsp"%>

<%@ page
  import="de.proveo.rts.web.portal.login.exception.MaxFailedLoginsException"%>
<%@ page
  import="de.proveo.rts.web.portal.login.exception.MaxSimultanousSessionException"%>
<%@ page
  import="de.proveo.rts.web.portal.login.exception.UserDisabledException"%>
<%@ page import="de.proveo.rts.web.util.RtsUtil"%>


<%@page import="de.proveo.rts.web.portal.login.exception.WebAppDisabledException"%>
<form id="loginform"
  action="<%=themeDisplay.getPathMain()%>/portal/login" method="post" autocomplete="off"
  name="fm1"><input name="<%=Constants.CMD%>" type="hidden"
  value="already-registered"> <%
 	String login = de.proveo.rts.web.portal.login.LoginAction.getLogin(
 			request, "login", company);
 	String password = StringPool.BLANK;
 	boolean rememberMe = ParamUtil.getBoolean(request, "rememberMe");
 %> <input name="rememberMe" type="hidden" value="<%=rememberMe%>">

<table>
  <tr>
    <td>
    <fieldset><legend>Login</legend>
    <p><label for="name"><%=LanguageUtil.get(pageContext, "login")%>:</label><br />
    <input name="login" style="width: 150px;" type="text"
      value="<%=login%>" id="loginInput"></p>
    <p><label for="password"><%=LanguageUtil.get(pageContext, "password")%>:</label><br />
    <input name="password" style="width: 150px" type="password"
      value="<%=password%>" id="passwordInput"></p>
    <p><input type="submit"
      value="<%=LanguageUtil.get(pageContext, "sign-in")%>"
      id="loginButton"></p>
    </fieldset>

    </td>

    <td><img style="margin-left: 70px;"
      src="/images/customer_logo_large.jpg" /></td>
  </tr>

  <tr>
    <td><c:if
      test="<%=SessionErrors.contains(request, AuthException.class
							.getName())%>">

      <br>
      <span class="proveo_portlet-msg-error"> <%=LanguageUtil.get(pageContext, "authentication-failed")%></span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request,
							CookieNotSupportedException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil
									.get(pageContext,
											"authentication-failed-please-enable-browser-cookies")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request, NoSuchUserException.class
							.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext,
							"please-enter-a-valid-login")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request, PrincipalException.class
							.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil
									.get(
											pageContext,
											"you-have-attempted-to-access-a-section-of-the-site-that-requires-authentication")%>
      <%=LanguageUtil.get(pageContext,
							"please-sign-in-to-continue")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test='<%=SessionErrors.contains(request,
							UserEmailAddressException.class.getName())%>'>
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext,
							"please-enter-a-valid-login")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request,
							UserPasswordException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext,
							"please-enter-a-valid-password")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request,
							MaxFailedLoginsException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext,
							"maximum-failed-login-limit-reached")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request,
							MaxSimultanousSessionException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext,
							"maximum-simultanous-sessions-limit-exceeded")%> </span>

      <br>
      <br>
    </c:if> <c:if
      test="<%=SessionErrors.contains(request,
							UserDisabledException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext, "user-is-disabled")%> </span>

      <br>
      <br>
    </c:if>
     <c:if
      test="<%=SessionErrors.contains(request,
              WebAppDisabledException.class.getName())%>">
      <span class="proveo_portlet-msg-error"
        style="font-size: xx-small;"> <%=LanguageUtil.get(pageContext, "webapp-is-disabled")%> </span>

      <br>
      <br>
    </c:if>
    
    
    </td>
    <td></td>
  </tr>
  <tr>
    <td style="text-align: right"><span
      style="color: grey; font-size: 0.8em"><%=RtsUtil.getShortVersionString()%></span></td>
  </tr>



</table>
</form>


 <script type="text/javascript">

	document.fm1.login.focus();
 </script>
