src/org/openbravo/erpCommon/security/Login.html
author Asier Lostalé <asier.lostale@openbravo.com>
Thu, 10 Nov 2011 15:37:54 +0100
changeset 14340 3a1a0ab3e17f
parent 14205 9119d097691b
child 14342 6531955151aa
permissions -rw-r--r--
[golden] Show in log in page warn about near expiration
asier@8910
     1
<!--
asier@8910
     2
 *************************************************************************
asier@8910
     3
 * The contents of this file are subject to the Openbravo  Public  License
priya@9072
     4
 * Version  1.1  (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 
asier@10033
    14
 * All portions are Copyright (C) 2010-2011 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@8931
    28
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
asier@8920
    29
<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
asier@8920
    30
<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
asier@8923
    31
<script language="JavaScript" src="../utility/CheckCleanCache.js?cache=true" type="text/javascript"></script>
asier@8923
    32
<script language="JavaScript" src="../utility/CheckCleanCache.js?cache=false" type="text/javascript"></script>
david@8941
    33
<script language="JavaScript" type="text/javascript" id="visualPrefs">var showCompanyLogo = true, showSupportLogo = true, showForgeLogo = true, urlCompany = 'http://www.openbravo.com/', urlSupport = 'http://support.openbravo.com/';/* Parameters retreived from Login.java */</script>
david@8939
    34
<script language="JavaScript" type="text/javascript">var urlForge = 'http://forge.openbravo.com/';</script>
asier@14340
    35
<script language="JavaScript" type="text/javascript" id="expirationMessage"></script>
david@8931
    36
<script language="JavaScript" type="text/javascript" id="cacheMsg">var cacheMsg = 'xx';</script>
david@10246
    37
<script language="JavaScript" type="text/javascript" id="validBrowserMsg">var validBrowserMsg = 'xx';</script>
david@10269
    38
<script language="JavaScript" type="text/javascript" id="validBrowserMsgOrHigher">var validBrowserMsgOrHigher = 'xx';</script>
david@10246
    39
<script language="JavaScript" type="text/javascript" id="recBrowserMsgTitle">var recBrowserMsgTitle = 'xx';</script>
david@10246
    40
<script language="JavaScript" type="text/javascript" id="recBrowserMsgText">var recBrowserMsgText = 'xx';</script>
asier@8923
    41
david@10269
    42
<script language="JavaScript" type="text/javascript">
david@10269
    43
var validBrowserFirefox = '3.6.0.0';
david@10269
    44
var validBrowserChrome = '8.0.0.0';
david@10269
    45
var validBrowserExplorer = '7.0.0.0';
david@10269
    46
var validBrowserSafari = '5.0.0.0';
david@10269
    47
david@10269
    48
var recBrowserFirefox = '4.0.0.0';
david@12918
    49
var recBrowserChrome = '9.0.0.0';
david@10269
    50
var recBrowserExplorer = '9.0.0.0';
david@12918
    51
var recBrowserSafari = '5.0.0.0';
david@10269
    52
</script>
david@10269
    53
asier@8910
    54
<script type="text/javascript">
asier@8910
    55
  function redirectWhenPopup() {
asier@8910
    56
    var permission = false;
asier@8910
    57
    try {
asier@8910
    58
      if (top.opener.parent.frames['appFrame']) {
asier@8910
    59
        permission = true;
asier@8910
    60
      }
asier@8910
    61
    }
asier@8910
    62
    catch (e) {}
asier@8910
    63
    if (permission && top.opener) {
asier@8910
    64
      top.opener.parent.location.href = top.document.location.href;
asier@8910
    65
      top.window.close();
asier@8910
    66
    }
asier@8910
    67
  }
asier@8910
    68
asier@8910
    69
  function redirectWhenInsideMDI() {
asier@8910
    70
    if (typeof isWindowInMDIPage !== 'undefined' && isWindowInMDIPage) {
david@8918
    71
      var LayoutMDI = null;
david@8918
    72
      if (isWindowInMDIPopup && parent.opener) {
david@8918
    73
        LayoutMDI = parent.opener.getFrame('LayoutMDI'); // Since getFrame('LayoutMDI') function frameset checks equals the current opened Login_FS.html modal popup
david@8918
    74
      } else {
david@8918
    75
        LayoutMDI = getFrame('LayoutMDI');
david@8918
    76
      }
asier@8910
    77
      if (LayoutMDI && typeof parent.document.getElementById('framesetMenu') === 'object') {
asier@8910
    78
        LayoutMDI.location.href = parent.window.location.href;
asier@8910
    79
      }
asier@8910
    80
    }
asier@8910
    81
  }
asier@8910
    82
asier@8910
    83
  function hideMenuFrame() {
asier@8910
    84
    if (parent.document.getElementById('framesetMenu')) {
asier@8910
    85
      parent.document.getElementById('framesetMenu').cols = parent.document.getElementById('framesetMenu').cols.replace(parent.menuWidth, '0%');
asier@8910
    86
    }
asier@8910
    87
  }
david@8918
    88
</script>
david@8918
    89
<script type="text/javascript">
david@8958
    90
  function setLoginMessage(type, title, text) {
david@8931
    91
    if (type === 'Error') {
david@8918
    92
      var msgContainer = document.getElementById('errorMsg');
david@8958
    93
      var msgContainerTitle = document.getElementById('errorMsgTitle');
david@13393
    94
      var msgContainerTitleContainer = document.getElementById('errorMsgTitle_Container');
david@8958
    95
      var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
    96
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
    97
        msgContainerTitle.innerHTML = title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@13393
    98
        msgContainerTitleContainer.style.display = '';
david@8958
    99
      } else {
david@8958
   100
        msgContainerTitle.innerHTML = '';
david@13393
   101
        msgContainerTitleContainer.style.display = 'none';
david@8958
   102
      }
david@8958
   103
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
   104
        msgContainerContent.innerHTML = text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>');
david@8958
   105
      } else {
david@8958
   106
        msgContainerContent.innerHTML = '';
david@8958
   107
      }
david@8931
   108
      msgContainer.style.display = '';
david@10269
   109
      isRecBrowserMsgShown = false;
david@8931
   110
    } else if (type === 'Warning') {
david@8958
   111
      var alertText = '';
david@8958
   112
      if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@8958
   113
        alertText += title.replace(/<br>/g, '\n') + '\n';
david@8958
   114
      }
david@8958
   115
      if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@8958
   116
        alertText += text.replace(/<br>/g, '\n')
david@8958
   117
      }
david@8958
   118
      alert(alertText);
asier@8910
   119
    }
asier@8910
   120
  }
asier@8921
   121
david@10269
   122
  var isRecBrowserMsgShown = false;
david@10246
   123
  function setRecommendedBrowserMessage(title, text) {
david@10246
   124
    var msgContainer = document.getElementById('errorMsg');
david@10246
   125
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@10246
   126
    var msgContainerContent = document.getElementById('errorMsgContent');
david@10246
   127
    msgContainerTitle.innerHTML = '';
david@10246
   128
    if (typeof title !== 'undefined' && title !== '' && title !== null) {
david@10246
   129
      msgContainerContent.innerHTML = '<span class="Login_RecBrowserMsg_Title">' + title.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + ': ' + '</span>';
david@10246
   130
    } else {
david@10246
   131
      msgContainerContent.innerHTML = '';
david@10246
   132
    }
david@10246
   133
    if (typeof text !== 'undefined' && text !== '' && text !== null) {
david@10246
   134
      msgContainerContent.innerHTML = msgContainerContent.innerHTML + '<span class="Login_RecBrowserMsg_Content">' + text.replace(/\n/g, '<br>').replace(/\\n/g, '<br>') + '</span>';
david@10246
   135
    }
david@10246
   136
    msgContainer.style.display = '';
david@10269
   137
    isRecBrowserMsgShown = true;
david@10246
   138
  }
david@10246
   139
david@8973
   140
  function resetLoginMessage() {
asier@8921
   141
    var msgContainer = document.getElementById('errorMsg');
david@8958
   142
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@13393
   143
    var msgContainerTitleContainer = document.getElementById('errorMsgTitle_Container');
david@8958
   144
    var msgContainerContent = document.getElementById('errorMsgContent');
david@8958
   145
    msgContainerTitle.innerHTML = '';
david@13393
   146
    msgContainerTitleContainer.style.display = '';
david@8958
   147
    msgContainerContent.innerHTML = '';
david@8931
   148
    msgContainer.style.display = 'none';
david@10269
   149
    isRecBrowserMsgShown = false;
asier@8921
   150
  }
david@8973
   151
david@8973
   152
  function addInputChangeCheck(input) {
david@8973
   153
    setObjAttribute(input, 'onkeypress', 'checkInputKeyDown(this); return true;');
david@8973
   154
    setObjAttribute(input, 'oncut', 'checkInputKeyDown(this); return true;');
david@8973
   155
    setObjAttribute(input, 'oncopy', 'checkInputKeyDown(this); return true;');
david@8973
   156
    setObjAttribute(input, 'onpaste', 'checkInputKeyDown(this); return true;');
david@8973
   157
  }
david@8973
   158
david@8973
   159
  function checkInputKeyDown(input, valueLength) {
david@8973
   160
    var msgContainer = document.getElementById('errorMsg');
david@10269
   161
    if (msgContainer.style.display !== 'none' && typeof input === 'object') {
david@10269
   162
      if (typeof valueLength === 'undefined' || valueLength === null) {
david@8973
   163
        valueLength = input.value.length;
david@8973
   164
        setTimeout(function() { checkInputKeyDown(input, valueLength); }, 100);
david@8973
   165
      } else {
david@10269
   166
        if (valueLength !== input.value.length && !isRecBrowserMsgShown) {
david@8973
   167
          resetLoginMessage();
david@8973
   168
        }
david@8973
   169
      }
david@8973
   170
    }
david@8973
   171
    return true;
david@8973
   172
  }
david@8918
   173
</script>
david@8918
   174
<script type="text/javascript">
david@8918
   175
  function buttonOK_click() {
david@8939
   176
    if (focusedWindowElement.id === 'user' && document.getElementById('user').value === '') {
david@8934
   177
      return true;
david@8939
   178
    } else if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8937
   179
      setTimeout(function() { // To manage browser autocomplete feature if it is active
david@8939
   180
       if (focusedWindowElement.id === 'user' && document.getElementById('password').value === '') {
david@8934
   181
         setWindowElementFocus(document.getElementById('password')) 
david@8934
   182
       } else {
david@8934
   183
         return true;
david@8934
   184
       }
david@8934
   185
      }, 10);
david@8939
   186
    } else if (focusedWindowElement.id === 'password' && document.getElementById('password').value === '') {
david@8934
   187
      return true;
david@8939
   188
    } else if (focusedWindowElement.id === 'password' && document.getElementById('user').value === '') {
david@8934
   189
      setWindowElementFocus(document.getElementById('user'))
david@8934
   190
    } else {
david@8934
   191
      disableButton('buttonOK');
david@8934
   192
      submitXmlHttpRequest(loginResult, document.frmIdentificacion, 'DEFAULT', '../secureApp/LoginHandler.html', false, null, null);
david@8934
   193
    }
david@8918
   194
    return false;
david@8918
   195
  }
asier@8919
   196
asier@8919
   197
  function loginResult(paramXMLParticular, XMLHttpRequestObj) {
david@8931
   198
     var strText = '';
david@8931
   199
     if (getReadyStateHandler(XMLHttpRequestObj, null, false)) {
asier@8919
   200
       if (XMLHttpRequestObj.responseText) {
asier@8919
   201
         strText = XMLHttpRequestObj.responseText;
asier@8919
   202
       }
asier@8919
   203
       strText = strText.toString();
david@8931
   204
       var result = eval('('+strText+')');
asier@8919
   205
       processResult(result);
asier@8919
   206
     }
asier@8919
   207
  }
asier@8919
   208
asier@8919
   209
  function processResult(result){
asier@8919
   210
    if (result.showMessage) {
david@8958
   211
      setLoginMessage(result.messageType, result.messageTitle, result.messageText);
david@8934
   212
      document.getElementById('password').value = '';
asier@8919
   213
    }
asier@8919
   214
david@8931
   215
    if (!result.showMessage || result.messageType === 'Warning') {
david@8931
   216
      var target;
asier@8936
   217
      try {
asier@8936
   218
        if (parent.frameMenu) {
asier@8936
   219
          target = '_parent';
asier@8936
   220
        } else {
asier@8936
   221
          target = '_self';
asier@8936
   222
        }
asier@8936
   223
      } catch (e) {
asier@8936
   224
        target = '_self';
david@8931
   225
      }
asier@8935
   226
      submitCommandForm('DEFAULT', false, null, result.target, target, true);
asier@8923
   227
    } else {
david@8931
   228
      enableButton('buttonOK');
david@8966
   229
      setWindowElementFocus('password', 'id');
asier@8923
   230
    }
asier@8919
   231
  }
david@8918
   232
</script>
david@8918
   233
<script type="text/javascript">
david@8937
   234
  function manageVisualPreferences() {
david@10723
   235
    var topLogos = document.getElementById('TopLogos_Container');
david@8937
   236
    var bottomLogos = document.getElementById('BottomLogos_Container');
david@8939
   237
    if (showSupportLogo && showForgeLogo) {
david@10723
   238
      topLogos.className = 'Login_TopLogos_Container_Support_Forge';
david@8937
   239
    } else if (showSupportLogo) {
david@10723
   240
      topLogos.className = 'Login_TopLogos_Container_Support';
david@8939
   241
    } else if (showForgeLogo) {
david@10723
   242
      topLogos.className = 'Login_TopLogos_Container_Forge';
david@8937
   243
    } else {
david@10723
   244
      topLogos.className = 'Login_TopLogos_Container_None';
david@8937
   245
    }
david@8937
   246
david@8939
   247
    if (showCompanyLogo && urlCompany !== '') {
david@8971
   248
      document.getElementById('CompanyLogo_Container').innerHTML = '<a href="' + urlCompany + '" target="_blank" class="Login_Img_Link">' + document.getElementById('CompanyLogo_Container').innerHTML + '</a>';
david@8937
   249
    }
david@8937
   250
david@8939
   251
    if (showSupportLogo && urlSupport !== '') {
david@8971
   252
      document.getElementById('SupportLogo_Container').innerHTML = '<a href="' + urlSupport + '" target="_blank" class="Login_Img_Link">' + document.getElementById('SupportLogo_Container').innerHTML + '</a>';
david@8937
   253
    }
david@8937
   254
david@8939
   255
    if (showForgeLogo && urlForge !== '') {
david@8971
   256
      document.getElementById('ForgeLogo_Container').innerHTML = '<a href="' + urlForge + '" target="_blank" class="Login_Img_Link">' + document.getElementById('ForgeLogo_Container').innerHTML + '</a>';
david@8937
   257
    }
david@8937
   258
david@8937
   259
    if (showCompanyLogo) {
david@8939
   260
      document.getElementById('CompanyLogo_Container').style.display = ''
david@8937
   261
    }
david@10723
   262
    topLogos.style.display = '';
david@8939
   263
    bottomLogos.style.display = '';
david@8937
   264
  }
david@9005
   265
david@9005
   266
  function maskLoginWindow(errorMsg) {
david@9005
   267
    var client = document.getElementById('client');
david@9005
   268
    var blocker = document.getElementById('blocker');
david@9005
   269
    blocker.innerHTML = '<div class="Login_Home_Logo_Icon" style="position: relative; padding: 50px 0px 0px 0px; margin: 0 auto;"></div><div class="LabelText" style="position: relative; text-align: center; color: red; font-size: 11pt; padding: 10px 0px 0px 0px; width: 608px; margin: 0 auto;">' + errorMsg + '</div>';
david@9005
   270
    blocker.style.display = '';
david@9005
   271
    client.style.display = 'none';
david@9005
   272
  }
david@8937
   273
</script>
david@8937
   274
<script type="text/javascript">
david@10269
   275
  function browserVersionToFloat(versionNum) {
david@10269
   276
    while (versionNum.indexOf('.') !== versionNum.lastIndexOf('.')) {
david@10269
   277
      versionNum = versionNum.substring(0, versionNum.lastIndexOf('.')) + versionNum.substring(versionNum.lastIndexOf('.')+1, versionNum.length);
david@10269
   278
    }
david@10269
   279
    versionNum = parseFloat(versionNum, 10);
david@10269
   280
    return versionNum;
david@10269
   281
  }
david@10269
   282
david@10269
   283
  function browserVersionTrim(versionNum) {
david@12919
   284
    while ((versionNum.substring(versionNum.length-1, versionNum.length) === '0' && versionNum.indexOf('.') !== -1) || versionNum.substring(versionNum.length-1, versionNum.length) === '.') {
david@12919
   285
      versionNum = versionNum.substring(0, versionNum.length-1);
david@10269
   286
    }
david@10269
   287
    return versionNum;
david@10269
   288
  }
david@10269
   289
david@10269
   290
  /**
david@10269
   291
  * Checks if the browser is a supported one. Just for 2.50
david@10269
   292
  */
david@10269
   293
  function checkBrowserCompatibility() {
david@10269
   294
    var browserName = getBrowserInfo('name');
david@10269
   295
    var browserVersion = getBrowserInfo('version');
david@10269
   296
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   297
    var isValid = false;
david@10269
   298
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   299
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserFirefox)) {
david@10269
   300
        isValid = true;
david@10269
   301
      }
david@10269
   302
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   303
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserExplorer)) {
david@10269
   304
        isValid = true;
david@10269
   305
      }
david@10269
   306
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   307
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserChrome)) {
david@10269
   308
        isValid = true;
david@10269
   309
      }
david@10269
   310
    } else if (browserName.toUpperCase().indexOf('APPLE SAFARI') != -1) {
david@10269
   311
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserSafari)) {
david@10269
   312
        isValid = true;
david@10269
   313
      }
david@10269
   314
    }
david@10269
   315
    return isValid;
david@10269
   316
  }
david@10269
   317
david@10269
   318
  /**
david@10269
   319
  * Checks if the browser is a recommended one
david@10269
   320
  */
david@10269
   321
  function checkRecommendedBrowser() {
david@10269
   322
    var browserName = getBrowserInfo('name');
david@10269
   323
    var browserVersion = getBrowserInfo('version');
david@10269
   324
    var browserMajorVersion = getBrowserInfo('majorVersion');
david@10269
   325
    var isRecommended = false;
david@10269
   326
    if (browserName.toUpperCase().indexOf('FIREFOX') != -1 || browserName.toUpperCase().indexOf('ICEWEASEL') != -1) {
david@10269
   327
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserFirefox)) {
david@10269
   328
        isRecommended = true;
david@10269
   329
      }
david@10269
   330
    } else if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
david@10269
   331
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserExplorer)) {
david@10269
   332
        isRecommended = true;
david@10269
   333
      }
david@10269
   334
    } else if (browserName.toUpperCase().indexOf('GOOGLE CHROME') != -1) {
david@10269
   335
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserChrome)) {
david@10269
   336
        isRecommended = true;
david@10269
   337
      }
david@12918
   338
    } else if (browserName.toUpperCase().indexOf('APPLE SAFARI') != -1) {
david@12918
   339
      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserSafari)) {
david@12918
   340
        isRecommended = true;
david@12918
   341
      }
david@10269
   342
    }
david@10269
   343
    return isRecommended;
david@10269
   344
  }
david@10269
   345
david@10269
   346
  function buildValidBrowserMsg() {
david@10269
   347
    var displayValidBrowserMsg = validBrowserMsg;
david@10269
   348
    displayValidBrowserMsg = displayValidBrowserMsg
david@10269
   349
      + '<br>' + ' * Mozilla Firefox ' + browserVersionTrim(validBrowserFirefox) + ' ' + validBrowserMsgOrHigher
david@10269
   350
      + '<br>' + ' * Google Chrome ' + browserVersionTrim(validBrowserChrome) + ' ' + validBrowserMsgOrHigher
david@10269
   351
      + '<br>' + ' * Microsoft Internet Explorer ' + browserVersionTrim(validBrowserExplorer) + ' ' + validBrowserMsgOrHigher
david@10269
   352
      + '<br>' + ' * Apple Safari ' + browserVersionTrim(validBrowserSafari) + ' ' + validBrowserMsgOrHigher;
david@10269
   353
    return displayValidBrowserMsg;
david@10269
   354
  }
david@10269
   355
david@10269
   356
  function buildRecBrowserMsgText() {
david@10269
   357
    var displayRecBrowserMsgText = recBrowserMsgText;
david@12918
   358
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('XX', 'Google Chrome ' + browserVersionTrim(recBrowserChrome) + ', Mozilla Firefox ' + browserVersionTrim(recBrowserFirefox) + ', Internet Explorer ' + browserVersionTrim(recBrowserExplorer));
david@12918
   359
    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('YY', 'Apple Safari ' + browserVersionTrim(recBrowserSafari) + '');
david@10269
   360
    return displayRecBrowserMsgText;
david@10269
   361
  }
david@10269
   362
</script>
david@10269
   363
<script type="text/javascript">
asier@8910
   364
  function beforeLoadDo() {
asier@8910
   365
    redirectWhenPopup();
asier@8910
   366
    redirectWhenInsideMDI();
asier@8910
   367
    hideMenuFrame();
asier@8910
   368
  }
asier@8910
   369
asier@8910
   370
  function onLoadDo() {
david@13393
   371
    var msgContainer = document.getElementById('errorMsg');
david@13393
   372
    var msgContainerTitle = document.getElementById('errorMsgTitle');
david@13393
   373
    var msgContainerTitleContainer = document.getElementById('errorMsgTitle_Container');
david@13393
   374
    var msgContainerContent = document.getElementById('errorMsgContent');
david@13393
   375
david@13393
   376
    if (msgContainerTitle.innerHTML.length === 0) {
david@13393
   377
      msgContainerTitleContainer.style.display = 'none';
david@13393
   378
    }
david@9002
   379
    try { // To avoid in a release upgrade, that a change in code depending on these functions cause revisionControl message not being displayed
david@9002
   380
      manageVisualPreferences();
david@9002
   381
      addInputChangeCheck(document.getElementById('user'));
david@9002
   382
      addInputChangeCheck(document.getElementById('password'));
david@9002
   383
      this.windowTables = new Array(
david@9002
   384
        new windowTableId('client', 'buttonOK')
david@9002
   385
      );
david@9002
   386
      setWindowTableParentElement();
david@9002
   387
      enableShortcuts('edition');
david@9002
   388
      setWindowElementFocus('user', 'id');
david@9002
   389
    }
david@9002
   390
    catch (e) { }
asier@8923
   391
asier@14205
   392
    if ((!revisionControl('11669')) || (isOpsInstance() != isOpsInstanceCached())) {
david@9005
   393
      maskLoginWindow(cacheMsg);
david@8958
   394
      setLoginMessage('Warning', '', cacheMsg);
asier@8923
   395
    }
asier@8923
   396
asier@8923
   397
    if (!checkBrowserCompatibility()) {
david@10269
   398
      var displayValidBrowserMsg = buildValidBrowserMsg();
david@10269
   399
      setLoginMessage('Warning', '', displayValidBrowserMsg);
david@10246
   400
    }
david@13393
   401
    if (!checkRecommendedBrowser() && msgContainerTitle.innerHTML.length === 0 && msgContainerContent.innerHTML.length === 0) {
david@10269
   402
      var displayRecBrowserMsgText = buildRecBrowserMsgText();
david@10269
   403
      setRecommendedBrowserMessage(recBrowserMsgTitle, displayRecBrowserMsgText);
asier@8923
   404
    }
asier@14340
   405
    
asier@14340
   406
    if (expirationMessage){
asier@14340
   407
      setLoginMessage(expirationMessage.type, expirationMessage.title, expirationMessage.text);
asier@14340
   408
      if (expirationMessage.disableLogin) {
asier@14340
   409
          disableButton('buttonOK');
asier@14340
   410
      }
asier@14340
   411
    }
asier@8910
   412
  }
asier@8910
   413
</script>
david@8918
   414
<script type="text/javascript">
david@8918
   415
  beforeLoadDo();
david@8918
   416
</script>
asier@8910
   417
</head>
david@8918
   418
<body onload="onLoadDo();">
david@9005
   419
  <div style="display: none; width: 100%; height: 100%; position: absolute; vertical-align: middle; padding: 0px; text-align: center;" id="blocker"></div>
asier@8910
   420
david@8918
   421
  <div class="Login_Main" id="client">
asier@8910
   422
david@8937
   423
    <div class="Login_Container">
asier@8910
   424
david@8937
   425
      <div class="Login_LogForm">
david@8918
   426
        <form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" id="frmFormulario" autocomplete="off">
david@14041
   427
          <input type="hidden" name="Command" value="" />
david@8937
   428
david@14041
   429
          <div class="Login_LogForm_CompanyLogo_Container">
david@14041
   430
            <div class="Login_LogForm_CompanyLogo" id="CompanyLogo_Container" style="display: none;"><img class="Login_Logo_Company" src="../../../../../web/images/blank.gif" /></div>
david@14041
   431
          </div>
david@14041
   432
          <div class="Login_LogForm_Input_Container">
david@14041
   433
            <dl>
david@14041
   434
              <dt>
david@14041
   435
                <label for="user" class="LabelText Login_LabelText">User Name</label>
david@14041
   436
              </dt>
david@14041
   437
              <dd>
david@14041
   438
                <input class="dojoValidateValid Login_TextBox" type="text" maxlength="60" name="user" id="user" />
david@14041
   439
              </dd>
david@14041
   440
              <dt>
david@14041
   441
                <label for="password" class="LabelText Login_LabelText">Password</label>
david@14041
   442
              </dt>
david@14041
   443
              <dd>
david@14041
   444
                <input class="dojoValidateValid Login_TextBox" type="password" maxlength="40" name="password" id="password" />
david@14041
   445
              </dd>
david@14041
   446
            </dl>
david@14041
   447
            <div id="errorMsg" class="LabelText Login_ErrorMsg_Container" style="display:none;">
david@14041
   448
              <span id="errorMsgTitle_Container"><span id="errorMsgTitle" class="Login_ErrorMsg_Title">xx</span><br></span><span id="errorMsgContent" class="Login_ErrorMsg_Content">xx</span>
david@8918
   449
            </div>
david@14041
   450
          </div>
david@14041
   451
        </form>
david@14041
   452
        <div class="Login_LogForm_Button_Container">
david@14041
   453
          <div class="Login_LogForm_Button">
david@14041
   454
            <button type="button" 
david@14041
   455
              id="buttonOK" 
david@14041
   456
              class="ButtonLink" 
david@14041
   457
              onclick="buttonOK_click();" 
david@14041
   458
              onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
david@14041
   459
              onblur="buttonEvent('onblur', this);" 
david@14041
   460
              onkeyup="buttonEvent('onkeyup', this);" 
david@14041
   461
              onkeydown="buttonEvent('onkeydown', this);" 
david@14041
   462
              onkeypress="buttonEvent('onkeypress', this);" 
david@14041
   463
              onmouseup="buttonEvent('onmouseup', this);" 
david@14041
   464
              onmousedown="buttonEvent('onmousedown', this);" 
david@14041
   465
              onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
david@14041
   466
              onmouseout="buttonEvent('onmouseout', this);">
david@14041
   467
              <table class="Button" id="fieldTable">
david@14041
   468
                <tr>
david@14041
   469
                  <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@14041
   470
                  <td class="Button_text Button_width">Log in</td>
david@14041
   471
                  <td class="Button_right"></td>
david@14041
   472
                </tr>
david@14041
   473
              </table>
david@14041
   474
            </button>
david@14041
   475
          </div>
david@14041
   476
          <div id="sign-in" style="margin-top:12px;">xxxSignIn</div>
david@14041
   477
        </div>
david@8918
   478
david@8918
   479
      </div>
david@10723
   480
david@10723
   481
      <div class="Login_TopLogos_Container_Support_Forge" id="TopLogos_Container" style="display: none;">
david@10723
   482
        <div style="height: 1px; width: 1px; font-size: 1"></div>
david@10723
   483
        <div class="Login_TopLogos_ForgeLogo_Container">
david@10723
   484
          <div class="LabelText Login_LabelText Login_TopLogos_ForgeLogo_Text">Project hosted at:</div>
david@10723
   485
          <div class="Login_TopLogos_ForgeLogo_Logo_Container" id="ForgeLogo_Container"><img class="Login_Logo_Forge" src="../../../../../web/images/blank.gif" /></div>
asier@8910
   486
        </div>
david@10723
   487
        <div class="Login_TopLogos_SupportLogo_Container">
david@10723
   488
          <div class="LabelText Login_LabelText Login_TopLogos_SupportLogo_Text">For support, contact:</div>
david@10723
   489
          <div class="Login_TopLogos_SupportLogo_Logo_Container" id="SupportLogo_Container"><img class="Login_Logo_Support" src="../../../../../web/images/blank.gif" /></div>
david@10723
   490
        </div>
david@8918
   491
      </div>
david@8918
   492
david@10723
   493
      <div class="Login_BottomLogos_Container" id="BottomLogos_Container" style="display: none;">
david@10723
   494
        <div class="Login_BottomLogos_Openbravo_Logo_Container" id="OpenbravoLogo_Container"><img class="Login_Logo_Openbravo" src="../../../../../web/images/blank.gif" /></div>
david@10723
   495
        <div class="Login_BottomLogos_CopyrightText_Container"><span class="Login_BottomLogos_CopyrightText">&copy; Copyright Openbravo <br />
david@10723
   496
        2001-2011</span></div>
david@8918
   497
      </div>
david@8918
   498
    </div>
asier@8910
   499
david@8918
   500
  </div>
asier@8910
   501
david@8918
   502
</body>
david@8918
   503
</html>