@@ -36,31 +68,61 @@
|
|
@@ -73,3 +135,4 @@
+
diff --git a/workflow/engine/templates/home/login_standard.html b/workflow/engine/templates/home/login_standard.html
index 0efcedd32..942268025 100644
--- a/workflow/engine/templates/home/login_standard.html
+++ b/workflow/engine/templates/home/login_standard.html
@@ -55,45 +55,97 @@
});
}
+ function getBrowserTimeZoneOffset()
+ {
+ var d = new Date();
+ var tzOffset = d.getTimezoneOffset();
+ return ((tzOffset > 0)? "-" : "") + (tzOffset * 60);
+ }
+
+ function stringReplace(strSearch, strReplace, str)
+ {
+ var expression = eval("/" + strSearch + "/g");
+
+ return str.replace(expression, strReplace);
+ }
+
+ function onLoad()
+ {
+ document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset();
+
+ if (document.getElementById("timeZoneFailed").value == "1") {
+ var strHtml = document.getElementById("details").innerHTML;
+ strHtml = stringReplace("\\{0\\}", document.getElementById("form[USR_TIME_ZONE]").value, strHtml);
+ strHtml = stringReplace("\\{1\\}", document.getElementById("form[BROWSER_TIME_ZONE]").value, strHtml);
+
+ document.getElementById("details").innerHTML = strHtml;
+ }
+ }
{/literal}
-
+
-
+
diff --git a/workflow/engine/xmlform/login/TimeZoneAlert.html b/workflow/engine/xmlform/login/TimeZoneAlert.html
new file mode 100644
index 000000000..435066514
--- /dev/null
+++ b/workflow/engine/xmlform/login/TimeZoneAlert.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
diff --git a/workflow/engine/xmlform/login/TimeZoneAlert.xml b/workflow/engine/xmlform/login/TimeZoneAlert.xml
new file mode 100644
index 000000000..1980bbe7a
--- /dev/null
+++ b/workflow/engine/xmlform/login/TimeZoneAlert.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/workflow/engine/xmlform/login/loginpm3.html b/workflow/engine/xmlform/login/loginpm3.html
index ac5c4ad2e..5a7149afe 100755
--- a/workflow/engine/xmlform/login/loginpm3.html
+++ b/workflow/engine/xmlform/login/loginpm3.html
@@ -2,6 +2,7 @@
id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" onsubmit="return validateForm('{$form_objectRequiredFields}');">
+ {$form.BROWSER_TIME_ZONE_OFFSET}
{$form.USR_PASSWORD}
-
+
diff --git a/workflow/engine/xmlform/login/loginpm3.xml b/workflow/engine/xmlform/login/loginpm3.xml
index 9ec48e180..135da30a4 100755
--- a/workflow/engine/xmlform/login/loginpm3.xml
+++ b/workflow/engine/xmlform/login/loginpm3.xml
@@ -1,5 +1,7 @@
+
+
@@ -38,34 +40,34 @@ function getElementsByClassNameIE8(node, classname) {
window.onload= function(){
var inputUser,
inputPass;
- if(document.getElementById('form[USR_USERNAME]').placeholder == undefined && document.getElementById('form[BSUBMIT]').classList == undefined){
+ if(document.getElementById('form[USR_USERNAME]').placeholder == undefined && document.getElementById('form[BSUBMIT]').classList == undefined){
document.getElementById('form[USR_USERNAME]').value = _('ID_USER');
document.getElementById('form[USR_PASSWORD_MASK]').value = _('ID_PASSWORD');
document.getElementById('form[BSUBMIT]').className = "button-login-success";
inputUser = document.getElementById('form[USR_USERNAME]');
inputPass = document.getElementById('form[USR_PASSWORD_MASK]');
-
+
inputUser.attachEvent("onclick", function (){
if(_('ID_USER') == inputUser.value){
inputUser.value="";
- }
+ }
});
inputUser.attachEvent("onblur", function (){
if(inputUser.value == ""){
inputUser.value=_('ID_USER');
- }
+ }
});
-
+
inputPass.attachEvent("onclick", function (){
if(_('ID_PASSWORD') == inputPass.value){
inputPass.value="";
- }
+ }
});
-
+
inputPass.attachEvent("onblur", function (){
if(inputPass.value == ""){
inputPass.value = _('ID_PASSWORD');
- }
+ }
});
@@ -74,7 +76,7 @@ window.onload= function(){
document.getElementById('form[USR_PASSWORD_MASK]').placeholder = _('ID_PASSWORD');
document.getElementById('form[BSUBMIT]').classList.remove('module_app_button___gray');
document.getElementById('form[BSUBMIT]').classList.add('button-login-success');
- }
+ }
};
// enable/disable forgot password link
@@ -158,8 +160,9 @@ leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function()
document.getElementById("form[USR_PASSWORD]").value = document.getElementById("form[USR_PASSWORD_MASK]").value;
document.getElementById("form[USR_PASSWORD_MASK]").value = "";
+ document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset();
if(!navigator.userAgent.indexOf("MSIE 8.0")>0)
- document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text");
+ document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text");
document.login.submit();
}.extend(document.getElementById('form[BSUBMIT]')));
diff --git a/workflow/engine/xmlform/login/sysLoginNoWSpm3.html b/workflow/engine/xmlform/login/sysLoginNoWSpm3.html
index 836cb1303..a2d8253bd 100644
--- a/workflow/engine/xmlform/login/sysLoginNoWSpm3.html
+++ b/workflow/engine/xmlform/login/sysLoginNoWSpm3.html
@@ -2,14 +2,15 @@
+ {$form.BROWSER_TIME_ZONE_OFFSET}
{$form.USR_PASSWORD}
-
-
+
+
diff --git a/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml b/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml
index f13b9fe5e..51cdc7daf 100755
--- a/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml
+++ b/workflow/engine/xmlform/login/sysLoginNoWSpm3.xml
@@ -1,5 +1,7 @@
+
+
@@ -44,7 +46,7 @@ function createEvent(elem, event, fn) {
window.onload= function(){
var inputUser,
inputWs,
- inputPass;
+ inputPass;
if(document.getElementById('form[USR_USERNAME]').placeholder === undefined && document.getElementById('form[BSUBMIT]').classList == undefined){
document.getElementById('form[USR_USERNAME]').value = _('ID_USER');
document.getElementById('form[USR_PASSWORD_MASK]').value = _('ID_PASSWORD');
@@ -52,49 +54,49 @@ window.onload= function(){
document.getElementById('form[BSUBMIT]').className = "button-login-success";
inputUser = document.getElementById('form[USR_USERNAME]');
inputPass = document.getElementById('form[USR_PASSWORD_MASK]');
- inputWs = document.getElementById('form[USER_ENV]');
+ inputWs = document.getElementById('form[USER_ENV]');
inputUser.attachEvent("onclick", function (){
if(_('ID_USER') == inputUser.value){
inputUser.value="";
- }
+ }
});
inputUser.attachEvent("onblur", function (){
if(inputUser.value == ""){
inputUser.value=_('ID_USER');
- }
+ }
});
-
+
inputPass.attachEvent("onclick", function (){
if(_('ID_PASSWORD') == inputPass.value){
inputPass.value="";
- }
+ }
});
-
+
inputPass.attachEvent("onblur", function (){
if(inputPass.value == ""){
inputPass.value = _('ID_PASSWORD');
- }
+ }
});
inputWs.attachEvent("onclick", function (){
if(_('ID_WORKSPACE') == inputWs.value){
inputWs.value="";
- }
+ }
});
inputWs.attachEvent("onblur", function (){
if(inputWs.value == ""){
inputWs.value = _('ID_WORKSPACE');
- }
+ }
});
-
+
}else{
document.getElementById('form[USR_USERNAME]').placeholder = _('ID_USER');
document.getElementById('form[USR_PASSWORD_MASK]').placeholder = _('ID_PASSWORD');
document.getElementById('form[USER_ENV]').placeholder = _('ID_WORKSPACE');
document.getElementById('form[BSUBMIT]').classList.remove('module_app_button___gray');
- document.getElementById('form[BSUBMIT]').classList.add('button-login-success');
+ document.getElementById('form[BSUBMIT]').classList.add('button-login-success');
}
};
@@ -131,9 +133,10 @@ leimnud.event.add(document.getElementById('form[USER_ENV]'), 'keypress', functio
leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() {
createCookie("pm_sys_sys", "{\"sys_sys\": \"" + getField("USER_ENV").value + "\"}", 365);
document.getElementById('form[USR_PASSWORD]').value = document.getElementById('form[USR_PASSWORD_MASK]').value;
- document.getElementById('form[USR_PASSWORD_MASK]').value = '';
+ document.getElementById('form[USR_PASSWORD_MASK]').value = '';
+ document.getElementById("form[BROWSER_TIME_ZONE_OFFSET]").value = getBrowserTimeZoneOffset();
if(!navigator.userAgent.indexOf("MSIE 8.0")>0)
- document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text");
+ document.getElementById("form[USR_PASSWORD_MASK]").setAttribute("type", "text");
document.sysLogin.submit();
}.extend(document.getElementById('form[BSUBMIT]')));