src/org/openbravo/erpCommon/security/Login.html
author Asier Lostalé <asier.lostale@openbravo.com>
Tue, 09 Nov 2010 12:20:29 +0100
changeset 8910 4e54fead5bdc
child 8918 f397e268ff90
permissions -rw-r--r--
[login] Show 3.0 login page in 3.0 instances
asier@8910
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
asier@8910
     2
asier@8910
     3
<!--
asier@8910
     4
 *************************************************************************
asier@8910
     5
 * The contents of this file are subject to the Openbravo  Public  License
asier@8910
     6
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
asier@8910
     7
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@8910
     8
 * file except in compliance with the License. You  may  obtain  a copy of
asier@8910
     9
 * the License at http://www.openbravo.com/legal/license.html 
asier@8910
    10
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@8910
    11
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@8910
    12
 * License for the specific  language  governing  rights  and  limitations
asier@8910
    13
 * under the License. 
asier@8910
    14
 * The Original Code is Openbravo ERP. 
asier@8910
    15
 * The Initial Developer of the Original Code is Openbravo SLU 
asier@8910
    16
 * All portions are Copyright (C) 2001-2009 Openbravo SLU 
asier@8910
    17
 * All Rights Reserved. 
asier@8910
    18
 * Contributor(s):  ______________________________________.
asier@8910
    19
 ************************************************************************
asier@8910
    20
-->
asier@8910
    21
asier@8910
    22
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
asier@8910
    23
asier@8910
    24
asier@8910
    25
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
asier@8910
    26
<title>Openbravo</title>
asier@8910
    27
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" id="favicon" />
asier@8910
    28
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/LoginNew/LoginNew.css" id="paramCSS" />
asier@8910
    29
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS" />
asier@8910
    30
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
asier@8910
    31
<script type="text/javascript" id="visualPrefs">var windowTitle = 'TestBravo', windowFavicon = 'http://www.noticias3d.com/favicon.ico', showYourCompanyLogo = true, showYourITServiceLogo = true, showForgeLogo = true;/* Parameters retreived from Login.java */</script>
asier@8910
    32
<script type="text/javascript" id="itServiceUrl">var itServiceUrl = 'http://www.openbravo.com'/* Parameter retreived from Login.java */</script>
asier@8910
    33
<script type="text/javascript">var loginError = false;</script>
asier@8910
    34
<script type="text/javascript">
asier@8910
    35
  function redirectWhenPopup() {
asier@8910
    36
    var permission = false;
asier@8910
    37
    try {
asier@8910
    38
      if (top.opener.parent.frames['appFrame']) {
asier@8910
    39
        permission = true;
asier@8910
    40
      }
asier@8910
    41
    }
asier@8910
    42
    catch (e) {}
asier@8910
    43
    if (permission && top.opener) {
asier@8910
    44
      top.opener.parent.location.href = top.document.location.href;
asier@8910
    45
      top.window.close();
asier@8910
    46
    }
asier@8910
    47
  }
asier@8910
    48
asier@8910
    49
  function redirectWhenInsideMDI() {
asier@8910
    50
    if (typeof isWindowInMDIPage !== 'undefined' && isWindowInMDIPage) {
asier@8910
    51
      var LayoutMDI = getFrame('LayoutMDI');
asier@8910
    52
      if (LayoutMDI && typeof parent.document.getElementById('framesetMenu') === 'object') {
asier@8910
    53
        LayoutMDI.location.href = parent.window.location.href;
asier@8910
    54
      }
asier@8910
    55
    }
asier@8910
    56
  }
asier@8910
    57
asier@8910
    58
  function setFormTarget() {
asier@8910
    59
    var target;
asier@8910
    60
    try {
asier@8910
    61
      if (parent.frameMenu) {
asier@8910
    62
        target = '_parent';
asier@8910
    63
      } else {
asier@8910
    64
        target = '_self';
asier@8910
    65
      }
asier@8910
    66
    } catch (e) {
asier@8910
    67
      target = '_self';
asier@8910
    68
    }
asier@8910
    69
    document.forms[0].target = target;
asier@8910
    70
    return false;
asier@8910
    71
  }
asier@8910
    72
asier@8910
    73
  function hideMenuFrame() {
asier@8910
    74
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    75
      parent.document.getElementById('framesetMenu').cols = parent.document.getElementById('framesetMenu').cols.replace(parent.menuWidth, '0%');
asier@8910
    76
    }
asier@8910
    77
  }
asier@8910
    78
asier@8910
    79
  function setWindowTitle(title) {
asier@8910
    80
    var target;
asier@8910
    81
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    82
      target = parent.window;
asier@8910
    83
    } else {
asier@8910
    84
      target = window;
asier@8910
    85
    }
asier@8910
    86
    target.document.title = title;
asier@8910
    87
  }
asier@8910
    88
asier@8910
    89
  function setWindowFavicon(favicon) {
asier@8910
    90
    var target;
asier@8910
    91
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    92
      target = parent.window;
asier@8910
    93
    } else {
asier@8910
    94
      target = window;
asier@8910
    95
    }
asier@8910
    96
    var favElement = target.document.getElementById('favicon'),
asier@8910
    97
        replacement = target.document.createElement('link'),
asier@8910
    98
        favParent = favElement.parentNode;
asier@8910
    99
    favParent.removeChild(favElement);
asier@8910
   100
    replacement.id = 'favicon';
asier@8910
   101
    replacement.href = favicon
asier@8910
   102
    replacement.setAttribute('rel','shortcut icon');
asier@8910
   103
    replacement.setAttribute('type','text/x-icon');
asier@8910
   104
    favParent.appendChild(replacement);
asier@8910
   105
  }
asier@8910
   106
asier@8910
   107
asier@8910
   108
asier@8910
   109
  function setLoginError(value) {
asier@8910
   110
    if (value) {
asier@8910
   111
      document.getElementById('error').style.visibility = 'visible';
asier@8910
   112
    } else {
asier@8910
   113
      document.getElementById('error').style.visibility = 'hidden';
asier@8910
   114
    }
asier@8910
   115
  }
asier@8910
   116
asier@8910
   117
  function beforeLoadDo() {
asier@8910
   118
    redirectWhenPopup();
asier@8910
   119
    redirectWhenInsideMDI();
asier@8910
   120
    hideMenuFrame();
asier@8910
   121
    setWindowTitle(windowTitle);
asier@8910
   122
    setWindowFavicon(windowFavicon);
asier@8910
   123
  }
asier@8910
   124
asier@8910
   125
  beforeLoadDo();
asier@8910
   126
  function onLoadDo() {
asier@8910
   127
    setLoginError(loginError);
asier@8910
   128
    setFormTarget();
asier@8910
   129
  }
asier@8910
   130
</script>
asier@8910
   131
</head>
asier@8910
   132
<body id="login" onload="onLoadDo();">
asier@8910
   133
asier@8910
   134
		<div class="container">
asier@8910
   135
asier@8910
   136
asier@8910
   137
		<div class="logbox">
asier@8910
   138
		<form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" action="DEFAULT" id="frmFormulario" autocomplete="off">
asier@8910
   139
        <input type="hidden" name="Command" value="DEFAULT"></input>
asier@8910
   140
        <fieldset>
asier@8910
   141
        <dl>
asier@8910
   142
        <dt><label for="user">User name</label></dt>
asier@8910
   143
        <dd><input name="user" id="user" type="text">
asier@8910
   144
        </dd>
asier@8910
   145
        <dt><label for="pw">Password</label></dt>
asier@8910
   146
        <dd><input name="password" id="pw" type="password"></dd>
asier@8910
   147
        </dl>
asier@8910
   148
        <span id="error" style="visibility: hidden;">The username or password you entered is not correct.</span>
asier@8910
   149
        <div class="button">
asier@8910
   150
          <button type="button" 
asier@8910
   151
            id="buttonOK" 
asier@8910
   152
            class="ButtonLink" 
asier@8910
   153
            onclick="form.submit();" 
asier@8910
   154
            onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
asier@8910
   155
            onblur="buttonEvent('onblur', this);" 
asier@8910
   156
            onkeyup="buttonEvent('onkeyup', this);" 
asier@8910
   157
            onkeydown="buttonEvent('onkeydown', this);" 
asier@8910
   158
            onkeypress="buttonEvent('onkeypress', this);" 
asier@8910
   159
            onmouseup="buttonEvent('onmouseup', this);" 
asier@8910
   160
            onmousedown="buttonEvent('onmousedown', this);" 
asier@8910
   161
            onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
asier@8910
   162
            onmouseout="buttonEvent('onmouseout', this);">
asier@8910
   163
            <table class="Button" id="fieldTable">
asier@8910
   164
              <tr>
asier@8910
   165
                <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Login" title="Login" src="../../../../../web/images/blank.gif" border="0" id="fieldButton" /></td>
asier@8910
   166
                <td class="Button_text Button_width">Login</td>
asier@8910
   167
                <td class="Button_right"></td>
asier@8910
   168
              </tr>
asier@8910
   169
            </table>
asier@8910
   170
          </button>
asier@8910
   171
          <input value="Log in" id="btsave-pw" class="bt-orange" name="login" type="submit" style="display: none">
asier@8910
   172
        </div>
asier@8910
   173
        </fieldset>
asier@8910
   174
        </form>
asier@8910
   175
		</div>
asier@8910
   176
        
asier@8910
   177
		<div class="login-top">
asier@8910
   178
		<a href="#" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;"><img src="../utility/GetOpenbravoLogo.png" alt="" height="34" width="122"></a>
asier@8910
   179
        <span>&copy;&nbsp;Copyright Openbravo <br> 2001-2010</span></div>
asier@8910
   180
        
asier@8910
   181
        <div class="login-foot">
asier@8910
   182
		<p class="left">For support, contact:
asier@8910
   183
        <a href="#"><img src="../utility/ShowImageLogo?logo=youritservicelogin" alt="your IT Service" height="55" width="197"></a></p>
asier@8910
   184
        <p class="right">Project hosted at:
asier@8910
   185
        <a href="#" onclick="openNewBrowser('http://forge.openbravo.com', 'Openbravo');return false;"><img src="http://forge.openbravo.com/themes/openbravo/images/ob_logo.gif" alt="Openbraov Forge, opening ERP's future!" height="54" width="400"></a></p></div>
asier@8910
   186
        <div class="copyright"></div>
asier@8910
   187
        </div>
asier@8910
   188
asier@8910
   189
asier@8910
   190
asier@8910
   191
</body></html>