src/org/openbravo/erpCommon/security/Login.html
author David Baz Fayos <david.baz@openbravo.com>
Mon, 15 Nov 2010 12:07:05 +0100
changeset 8918 f397e268ff90
parent 8910 4e54fead5bdc
child 8919 c1958f882b50
permissions -rw-r--r--
[login] Changed login styles - part1
asier@8910
     1
<!--
asier@8910
     2
 *************************************************************************
asier@8910
     3
 * The contents of this file are subject to the Openbravo  Public  License
asier@8910
     4
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
asier@8910
     5
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@8910
     6
 * file except in compliance with the License. You  may  obtain  a copy of
asier@8910
     7
 * the License at http://www.openbravo.com/legal/license.html 
asier@8910
     8
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@8910
     9
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@8910
    10
 * License for the specific  language  governing  rights  and  limitations
asier@8910
    11
 * under the License. 
asier@8910
    12
 * The Original Code is Openbravo ERP. 
asier@8910
    13
 * The Initial Developer of the Original Code is Openbravo SLU 
david@8918
    14
 * All portions are Copyright (C) 2010 Openbravo SLU 
asier@8910
    15
 * All Rights Reserved. 
asier@8910
    16
 * Contributor(s):  ______________________________________.
asier@8910
    17
 ************************************************************************
asier@8910
    18
-->
asier@8910
    19
david@8918
    20
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
david@8918
    21
<head>
asier@8910
    22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
asier@8910
    23
<title>Openbravo</title>
asier@8910
    24
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" id="favicon" />
asier@8910
    25
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS" />
david@8918
    26
<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
asier@8910
    27
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
david@8918
    28
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
asier@8910
    29
<script type="text/javascript">
asier@8910
    30
  function redirectWhenPopup() {
asier@8910
    31
    var permission = false;
asier@8910
    32
    try {
asier@8910
    33
      if (top.opener.parent.frames['appFrame']) {
asier@8910
    34
        permission = true;
asier@8910
    35
      }
asier@8910
    36
    }
asier@8910
    37
    catch (e) {}
asier@8910
    38
    if (permission && top.opener) {
asier@8910
    39
      top.opener.parent.location.href = top.document.location.href;
asier@8910
    40
      top.window.close();
asier@8910
    41
    }
asier@8910
    42
  }
asier@8910
    43
asier@8910
    44
  function redirectWhenInsideMDI() {
asier@8910
    45
    if (typeof isWindowInMDIPage !== 'undefined' && isWindowInMDIPage) {
david@8918
    46
      var LayoutMDI = null;
david@8918
    47
      if (isWindowInMDIPopup && parent.opener) {
david@8918
    48
        LayoutMDI = parent.opener.getFrame('LayoutMDI'); // Since getFrame('LayoutMDI') function frameset checks equals the current opened Login_FS.html modal popup
david@8918
    49
      } else {
david@8918
    50
        LayoutMDI = getFrame('LayoutMDI');
david@8918
    51
      }
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 hideMenuFrame() {
asier@8910
    59
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    60
      parent.document.getElementById('framesetMenu').cols = parent.document.getElementById('framesetMenu').cols.replace(parent.menuWidth, '0%');
asier@8910
    61
    }
asier@8910
    62
  }
david@8918
    63
</script>
david@8918
    64
<script type="text/javascript">
david@8918
    65
  function setLoginMessage(type, text) {
david@8918
    66
    if (type === "error") {
david@8918
    67
      var msgContainer = document.getElementById('errorMsg');
david@8918
    68
      msgContainer.innerHTML = text;
david@8918
    69
      msgContainer.style.display = "";
david@8918
    70
    } else if (type === "warning") {
david@8918
    71
      alert(text);
asier@8910
    72
    }
asier@8910
    73
  }
david@8918
    74
</script>
david@8918
    75
<script type="text/javascript">
david@8918
    76
  function buttonOK_click() {
david@8918
    77
    var target;
david@8918
    78
    try {
david@8918
    79
      if (parent.frameMenu) {
david@8918
    80
        target = "_parent";
david@8918
    81
      } else {
david@8918
    82
        target = "_self";
david@8918
    83
      }
david@8918
    84
    } catch (e) {
david@8918
    85
      target = "_self";
david@8918
    86
    }
david@8918
    87
    submitCommandForm('DEFAULT', false, null, '../secureApp/LoginHandler.html', target, true);
david@8918
    88
    return false;
david@8918
    89
  }
david@8918
    90
</script>
david@8918
    91
<script type="text/javascript">
asier@8910
    92
  function beforeLoadDo() {
asier@8910
    93
    redirectWhenPopup();
asier@8910
    94
    redirectWhenInsideMDI();
asier@8910
    95
    hideMenuFrame();
asier@8910
    96
  }
asier@8910
    97
asier@8910
    98
  function onLoadDo() {
david@8918
    99
    this.windowTables = new Array(
david@8918
   100
      new windowTableId('client', 'buttonOK')
david@8918
   101
    );
david@8918
   102
    setWindowTableParentElement();
david@8918
   103
    enableShortcuts('edition');
asier@8910
   104
  }
asier@8910
   105
</script>
david@8918
   106
<script type="text/javascript">
david@8918
   107
  beforeLoadDo();
david@8918
   108
</script>
asier@8910
   109
</head>
david@8918
   110
<body onload="onLoadDo();">
asier@8910
   111
david@8918
   112
  <div class="Login_Main" id="client">
asier@8910
   113
david@8918
   114
    <div class="container">
asier@8910
   115
david@8918
   116
      <div class="logbox">
david@8918
   117
        <form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" id="frmFormulario" autocomplete="off">
david@8918
   118
david@8918
   119
            <div style="height: 115px; text-align: center;">
david@8918
   120
              <div style="padding-top: 25px;"><a href="#" class="Login_Img_Link"><img class="Login_Logo_Company" src="../../../../../web/images/blank.gif" /></a></div>
david@8918
   121
            </div>
david@8918
   122
            <div style="height: 162px !important;">
david@8918
   123
              <dl>
david@8918
   124
                <dt>
david@8918
   125
                  <label for="user" class="LabelText Login_LabelText">User name</label>
david@8918
   126
                </dt>
david@8918
   127
                <dd>
david@8918
   128
                  <input class="dojoValidateValid Login_TextBox" type="text" maxlength="60" name="user" />
david@8918
   129
                </dd>
david@8918
   130
                <dt>
david@8918
   131
                  <label for="password" class="LabelText Login_LabelText">Password</label>
david@8918
   132
                </dt>
david@8918
   133
                <dd>
david@8918
   134
                  <input class="dojoValidateValid Login_TextBox" type="password" maxlength="40" name="password" />
david@8918
   135
                </dd>
david@8918
   136
              </dl>
david@8918
   137
              <div id="errorMsg" class="LabelText Login_ErrorMsg_LabelText" style="display: none;">The username or password you entered is not correct.</div>
david@8918
   138
            </div>
david@8918
   139
            <div class="button">
david@8918
   140
              <div>
david@8918
   141
                <button type="button" 
david@8918
   142
                  id="buttonOK" 
david@8918
   143
                  class="ButtonLink" 
david@8918
   144
                  onclick="buttonOK_click();" 
david@8918
   145
                  onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
david@8918
   146
                  onblur="buttonEvent('onblur', this);" 
david@8918
   147
                  onkeyup="buttonEvent('onkeyup', this);" 
david@8918
   148
                  onkeydown="buttonEvent('onkeydown', this);" 
david@8918
   149
                  onkeypress="buttonEvent('onkeypress', this);" 
david@8918
   150
                  onmouseup="buttonEvent('onmouseup', this);" 
david@8918
   151
                  onmousedown="buttonEvent('onmousedown', this);" 
david@8918
   152
                  onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
david@8918
   153
                  onmouseout="buttonEvent('onmouseout', this);">
david@8918
   154
                  <table class="Button" id="fieldTable">
david@8918
   155
                    <tr>
david@8918
   156
                      <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>
david@8918
   157
                      <td class="Button_text Button_width">Login</td>
david@8918
   158
                      <td class="Button_right"></td>
david@8918
   159
                    </tr>
david@8918
   160
                  </table>
david@8918
   161
                </button>
david@8918
   162
              </div>
david@8918
   163
            </div>
david@8918
   164
david@8918
   165
        </form>
david@8918
   166
      </div>
david@8918
   167
          
david@8918
   168
      <div class="login-top">
david@8918
   169
        <div>
david@8918
   170
          <img class="Main_NavBar_logo" src="../../../../../web/images/blank.gif" />
david@8918
   171
          <span style="margin-left: 520px; font-size: 70px; font-style: italic; font-weight: bold; color: #7F7F7F; font-family:'lucida sans',sans-serif;">3.0</span>
asier@8910
   172
        </div>
david@8918
   173
        <span style="display: block; margin-top: 215px; color: #afafaf; font-size: .9em;line-height: 0.9em; width: 14em; text-align: center; padding-bottom: 34px;">&copy; Copyright Openbravo <br />
david@8918
   174
        2001-2010</span>
david@8918
   175
      </div>
david@8918
   176
david@8918
   177
      <div style="position: relative; left: 110px; text-align: center; width: 100%;">
david@8918
   178
        <div style="width: 260px; position: relative; float: left;">
david@8918
   179
          <div style="text-align: center;" class="LabelText Login_LabelText">For support, contact:</div>
david@8918
   180
          <div style="text-align: center;"><a href="#" class="Login_Img_Link"><img class="Login_Logo_Support" src="../../../../../web/images/blank.gif" /></a></div>
asier@8910
   181
        </div>
david@8918
   182
        <div style="width: 350px; position: relative; float: left;">
david@8918
   183
          <div style="text-align: center;" class="LabelText Login_LabelText">Project hosted at:</div>
david@8918
   184
          <div style="text-align: center;"><a href="#" class="Login_Img_Link"><img class="Login_Logo_OBForge" src="../../../../../web/images/blank.gif" /></a></div>
david@8918
   185
        </div>
david@8918
   186
      </div>
asier@8910
   187
david@8918
   188
    </div>
asier@8910
   189
david@8918
   190
  </div>
asier@8910
   191
david@8918
   192
</body>
david@8918
   193
</html>