src/org/openbravo/erpCommon/security/Login.html
author Carlos Aristu <carlos.aristu@openbravo.com>
Mon, 14 Jan 2019 10:37:29 +0100
changeset 35310 0c885bc2fcec
parent 35265 596e7671b561
child 35323 7f68f19b9b80
permissions -rw-r--r--
fixes bug 39885: link to a document isn't followed properly after login

Before[1] the URL query string used to specify the link to a concrete document was being stored in session. After that changeset the code to save that value in session was no longer being executed, so it was not possible to recover the document link information.

To solve this problem now we keep the query string with the link information in the URL, and we retrieve it from there when needed.


[1] https://code.openbravo.com/erp/devel/pi/rev/6d6a3a710fd21bbc60de46c5778b212c64ec300c
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 
carlos@35310
    14
 * All portions are Copyright (C) 2010-2019 Openbravo SLU 
asier@8910
    15
 * All Rights Reserved. 
asier@8910
    16
 * Contributor(s):  ______________________________________.
asier@8910
    17
 ************************************************************************
asier@8910
    18
-->
asier@8910
    19
carlos@31834
    20
<html xmlns="http://www.w3.org/1999/xhtml" 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" />
carlos@31815
    25
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/loginStyles.css" id="paramCSS" />
carlos@31823
    26
<script type="text/javascript" src="../../../../../web/js/login.js" type="text/javascript"></script>
carlos@31823
    27
<script type="text/javascript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
carlos@31823
    28
<script type="text/javascript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
carlos@31823
    29
<script type="text/javascript" src="../utility/CheckCleanCache.js?cache=true" type="text/javascript"></script>
carlos@31823
    30
<script type="text/javascript" src="../utility/CheckCleanCache.js?cache=false" type="text/javascript"></script>
carlos@31823
    31
<script 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>
carlos@31823
    32
<script type="text/javascript">var urlForge = 'http://forge.openbravo.com/';</script>
carlos@31823
    33
<script type="text/javascript" id="expirationMessage"></script>
carlos@31823
    34
<script type="text/javascript" id="cacheMsg">var cacheMsg = 'xx';</script>
carlos@31823
    35
<script type="text/javascript" id="validBrowserMsg">var validBrowserMsg = 'xx';</script>
carlos@31823
    36
<script type="text/javascript" id="validBrowserMsgOrHigher">var validBrowserMsgOrHigher = 'xx';</script>
carlos@31823
    37
<script type="text/javascript" id="recBrowserMsgTitle">var recBrowserMsgTitle = 'xx';</script>
carlos@31823
    38
<script type="text/javascript" id="recBrowserMsgText">var recBrowserMsgText = 'xx';</script>
carlos@31823
    39
<script type="text/javascript" id="identificationFailureTitle">var identificationFailureTitle = 'xx';</script>
carlos@31823
    40
<script type="text/javascript" id="errorEmptyContent">var errorEmptyContent = 'xx';</script>
carlos@31823
    41
<script type="text/javascript" id="errorSamePassword">var errorSamePassword = 'xx';</script>
carlos@31823
    42
<script type="text/javascript" id="errorDifferentPasswordInFields">var errorDifferentPasswordInFields = 'xx';</script>
asier@8923
    43
carlos@31823
    44
<script type="text/javascript">
pablo@33493
    45
var validBrowserFirefox = '52.0.0.0';
pablo@35237
    46
var validBrowserChrome = '71.0.0.0';
david@26262
    47
var validBrowserExplorer = '9.0.0.0';
pablo@35237
    48
var validBrowserEdge = '42.0.0.0'; // EdgeHTML version
pablo@35237
    49
var validBrowserSafari = '10.0.0.0';
david@10269
    50
pablo@34168
    51
var recBrowserFirefox = '60.0.0.0';
pablo@35237
    52
var recBrowserChrome = '72.0.0.0';
david@25757
    53
var recBrowserExplorer = '11.0.0.0';
pablo@35237
    54
var recBrowserEdge = '44.0.0.0'; // EdgeHTML version
pablo@35237
    55
var recBrowserSafari = '12.0.0.0';
carlos@31833
    56
carlos@31833
    57
// currentRevision must be the same value as the one returned by getCurrentRevision() (see utils.js)
carlos@35310
    58
var currentRevision = '35310';
david@10269
    59
carlos@31849
    60
beforeLoadDo();
david@8918
    61
</script>
asier@8919
    62
asier@8910
    63
</head>
david@8918
    64
<body onload="onLoadDo();">
david@9005
    65
  <div style="display: none; width: 100%; height: 100%; position: absolute; vertical-align: middle; padding: 0px; text-align: center;" id="blocker"></div>
david@8918
    66
  <div class="Login_Main" id="client">
david@8937
    67
    <div class="Login_Container">
david@8937
    68
      <div class="Login_LogForm">
david@8918
    69
        <form method="post" action="../secureApp/LoginHandler.html" name="frmIdentificacion" id="frmFormulario" autocomplete="off">
david@14041
    70
          <input type="hidden" name="Command" value="" />
jonathan@28641
    71
          <input type="hidden" name="resetPassword" id="resetPassword" value="" />
david@14041
    72
          <div class="Login_LogForm_CompanyLogo_Container">
david@14041
    73
            <div class="Login_LogForm_CompanyLogo" id="CompanyLogo_Container" style="display: none;"><img class="Login_Logo_Company" src="../../../../../web/images/blank.gif" /></div>
david@14041
    74
          </div>
david@14041
    75
          <div class="Login_LogForm_Input_Container">
david@14041
    76
            <dl>
david@14041
    77
              <dt>
jonathan@28641
    78
                <label for="user" class="LabelText Login_LabelText" id="userlabel" >User Name</label>
david@28160
    79
              </dt>
jonathan@28672
    80
              <dt>
jonathan@28672
    81
                <label for="user" class="LabelText Login_LabelText" id="newpasswordlabel" style="display:none;">New Password</label>
david@14041
    82
              </dt>
david@14041
    83
              <dd>
david@14041
    84
                <input class="dojoValidateValid Login_TextBox" type="text" maxlength="60" name="user" id="user" />
david@14041
    85
              </dd>
david@14041
    86
              <dt>
jonathan@28641
    87
                <label for="password" class="LabelText Login_LabelText" id="passwordlabel" >Password</label>
david@28160
    88
              </dt>
jonathan@28672
    89
              <dt>
jonathan@28672
    90
                <label for="password" class="LabelText Login_LabelText" id="confirmpasswordlabel" style="display:none;">Confirm Password</label>
david@14041
    91
              </dt>
david@14041
    92
              <dd>
david@14041
    93
                <input class="dojoValidateValid Login_TextBox" type="password" maxlength="40" name="password" id="password" />
david@14041
    94
              </dd>
david@14041
    95
            </dl>
david@14041
    96
            <div id="errorMsg" class="LabelText Login_ErrorMsg_Container" style="display:none;">
david@14041
    97
              <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
    98
            </div>
david@14041
    99
          </div>
david@14041
   100
        </form>
david@14041
   101
        <div class="Login_LogForm_Button_Container">
david@14041
   102
          <div class="Login_LogForm_Button">
david@14041
   103
            <button type="button" 
david@14041
   104
              id="buttonOK" 
david@14041
   105
              class="ButtonLink" 
carlos@31816
   106
              onclick="doLogin();" 
david@14041
   107
              onfocus="buttonEvent('onfocus', this); window.status='Login'; return true;" 
david@14041
   108
              onblur="buttonEvent('onblur', this);" 
david@14041
   109
              onkeyup="buttonEvent('onkeyup', this);" 
david@14041
   110
              onkeydown="buttonEvent('onkeydown', this);" 
david@14041
   111
              onkeypress="buttonEvent('onkeypress', this);" 
david@14041
   112
              onmouseup="buttonEvent('onmouseup', this);" 
david@14041
   113
              onmousedown="buttonEvent('onmousedown', this);" 
david@14041
   114
              onmouseover="buttonEvent('onmouseover', this); window.status='Login'; return true;" 
david@14041
   115
              onmouseout="buttonEvent('onmouseout', this);">
david@14041
   116
              <table class="Button" id="fieldTable">
david@14041
   117
                <tr>
david@14041
   118
                  <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
   119
                  <td class="Button_text Button_width">Log in</td>
david@14041
   120
                  <td class="Button_right"></td>
david@14041
   121
                </tr>
david@14041
   122
              </table>
david@14041
   123
            </button>
david@14041
   124
          </div>
david@14041
   125
          <div id="sign-in" style="margin-top:12px;">xxxSignIn</div>
david@14041
   126
        </div>
david@8918
   127
      </div>
david@10723
   128
      <div class="Login_TopLogos_Container_Support_Forge" id="TopLogos_Container" style="display: none;">
david@10723
   129
        <div style="height: 1px; width: 1px; font-size: 1"></div>
david@10723
   130
        <div class="Login_TopLogos_ForgeLogo_Container">
david@10723
   131
          <div class="LabelText Login_LabelText Login_TopLogos_ForgeLogo_Text">Project hosted at:</div>
david@10723
   132
          <div class="Login_TopLogos_ForgeLogo_Logo_Container" id="ForgeLogo_Container"><img class="Login_Logo_Forge" src="../../../../../web/images/blank.gif" /></div>
asier@8910
   133
        </div>
david@10723
   134
        <div class="Login_TopLogos_SupportLogo_Container">
david@10723
   135
          <div class="LabelText Login_LabelText Login_TopLogos_SupportLogo_Text">For support, contact:</div>
david@10723
   136
          <div class="Login_TopLogos_SupportLogo_Logo_Container" id="SupportLogo_Container"><img class="Login_Logo_Support" src="../../../../../web/images/blank.gif" /></div>
david@10723
   137
        </div>
david@8918
   138
      </div>
david@10723
   139
      <div class="Login_BottomLogos_Container" id="BottomLogos_Container" style="display: none;">
david@10723
   140
        <div class="Login_BottomLogos_Openbravo_Logo_Container" id="OpenbravoLogo_Container"><img class="Login_Logo_Openbravo" src="../../../../../web/images/blank.gif" /></div>
javier@35265
   141
        <div class="Login_BottomLogos_CopyrightText_Container"><span class="Login_BottomLogos_CopyrightText">&copy; Copyright Openbravo <br/> 2001-2019</span>
javier@35265
   142
        </div>
david@8918
   143
      </div>
david@8918
   144
    </div>
david@8918
   145
  </div>
david@8918
   146
</body>
david@8918
   147
</html>