remove getStarted from login

This commit is contained in:
Fernando Ontiveros
2025-04-14 17:32:23 +00:00
parent cfc74c33fd
commit a3b33a1b0f
13 changed files with 120 additions and 629 deletions

View File

@@ -1,47 +1,38 @@
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');"> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="content" style="height:{$form_height};" >
<table width="99%">
<tr>
<td valign='top'>
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
<div style="display: none;"> {$form.USR_PASSWORD}</div>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
</tr>
<tr>
<td class='FormLabel' width="{$form_labelWidth}">{$USR_USERNAME}</td>
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_USERNAME}</td>
</tr>
<tr>
<td class='FormLabel' width="{$form_labelWidth}">{$USR_PASSWORD_MASK}</td>
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_PASSWORD_MASK}</td>
</tr>
<tr>
<td class='FormLabel' width="{$form_labelWidth}">{$USER_LANG}</td>
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USER_LANG}</td>
</tr>
<tr style="display: none">
<td colspan="2">{$form.URL}</td>
</tr>
<tr>
<td class='FormButton' colspan="2" align="">{$form.BSUBMIT}</td>
</tr>
<tr>
<td class='FormLabel' colspan="2" align="right">{$form.FORGOT_PASWORD_LINK}</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</div></form>
<script type="text/javascript">
{$form.JS}
</script>
<script type="text/javascript">
<div class="panel-default">
<p>{php}echo G::LoadTranslation('ID_LOGIN_TITLE');{/php}</p>
</div>
<form accept-charset="UTF-8" role="form" class="form-signin"
id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" onsubmit="return validateForm('{$form_objectRequiredFields}');">
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
{$form.BROWSER_TIME_ZONE_OFFSET}
<div style="display: none;"> {$form.USR_PASSWORD}</div>
<fieldset>
<label class="panel-login">
<div class="login_result"></div>
</label>
{$form.USR_USERNAME}
{$form.USR_PASSWORD_MASK}
{$form.USER_LANG}
{$form.URL}
</fieldset>
<fieldset>
<label class="panel-login">
<div class="login_result"></div>
</label>
<br>
{$form.BSUBMIT}
{$form.FORGOT_PASWORD_LINK}
</fieldset>
<script type="text/javascript">
{$form.JS}
</script>
</form>
<script src="/lib/pmdynaform/libs/respondjs/respond.min.js"></script>
<script src="/lib/pmdynaform/libs/html5shiv/html5shiv.js"></script>
<script type="text/javascript">
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
</script>
</script>

View File

@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?x ml version="1.0" encoding="UTF-8"?>
<dynaForm name="login" version="1.0" basedir="" xmlform_type="NORMAL" width="400px" enabletemplate="1">
<BROWSER_TIME_ZONE_OFFSET type="hidden" />
<TITLE type="title">
<en><![CDATA[Login]]></en>
</TITLE>
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any" autocomplete="0">
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any" autocomplete="0">
<en><![CDATA[User]]></en>
</USR_USERNAME>
<USR_PASSWORD type="text" size="30" maxlength="32" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD>
<USR_PASSWORD_MASK type="password" size="30" maxlength="32" autocomplete="0">
<USR_PASSWORD_MASK type="password" size="30" maxlength="100" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD_MASK>
<USER_LANG type="dropdown" sqlconnection="dbarray">
@@ -21,7 +23,7 @@ SELECT LANG_ID, LANG_NAME FROM langOptions
<BSUBMIT type="button">
<en><![CDATA[Login]]></en>
</BSUBMIT>
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135" style="display:none;">
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135">
<en><![CDATA[Forgot Password]]></en>
</FORGOT_PASWORD_LINK>
<JS type="javascript"><![CDATA[
@@ -41,10 +43,61 @@ function inIframe () {
return true;
}
};
function getElementsByClassNameIE8(node, classname) {
var a = [];
var re = new RegExp('(^| )'+classname+'( |$)');
var els = node.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
if(re.test(els[i].className))a.push(els[i]);
return a;
};
// enable/disable forgot password link
if(flagForgotPassword == 'on' || flagForgotPassword == '1') {
document.getElementById("form[FORGOT_PASWORD_LINK]").style.display = 'block';//hideRowById('FORGOT_PASWORD_LINK');
window.onload= function(){
var inputUser,
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');
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');
}
});
}else{
document.getElementById('form[USR_USERNAME]').placeholder = _('ID_USER');
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');
}
};
// delete or not forgot password link
if(flagForgotPassword != 'on' && flagForgotPassword != '1') {
var element = document.getElementById("form[FORGOT_PASWORD_LINK]");
element.parentNode.removeChild(element);
}
var panel;
@@ -54,7 +107,7 @@ function showGettingStarted() {
panel.options = {
size: {w:620,h:500},
position: {x:50,y:50,center:true},
control: {close:true,resize:false},fx:{modal:true},
control: {close:true,resize:false, drag: false},fx:{modal:true},
statusBar: false,
fx: {shadow:true,modal:true}
};
@@ -106,12 +159,17 @@ leimnud.event.add(document.getElementById('form[USR_PASSWORD_MASK]'), 'keypress'
});
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[USR_PASSWORD_MASK]').setAttribute('type', 'text');
document.login.submit();
//return true;
setNestedProperty(this, Array("disabled"), "true");
setNestedProperty(this, Array("value"), @@LOGIN_VERIFY_MSG);
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.login.submit();
}.extend(document.getElementById('form[BSUBMIT]')));
]]></JS>
</dynaForm>

View File

@@ -1,38 +0,0 @@
<div class="panel-default">
<p>{php}echo G::LoadTranslation('ID_LOGIN_TITLE');{/php}</p>
</div>
<form accept-charset="UTF-8" role="form" class="form-signin"
id="{$form_id}" name="{$form_name}" action="{$form_action}" method="post" encType="multipart/form-data" onsubmit="return validateForm('{$form_objectRequiredFields}');">
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
{$form.BROWSER_TIME_ZONE_OFFSET}
<div style="display: none;"> {$form.USR_PASSWORD}</div>
<fieldset>
<label class="panel-login">
<div class="login_result"></div>
</label>
{$form.USR_USERNAME}
{$form.USR_PASSWORD_MASK}
{$form.USER_LANG}
{$form.URL}
</fieldset>
<fieldset>
<label class="panel-login">
<div class="login_result"></div>
</label>
<br>
{$form.BSUBMIT}
{$form.FORGOT_PASWORD_LINK}
</fieldset>
<script type="text/javascript">
{$form.JS}
</script>
</form>
<script src="/lib/pmdynaform/libs/respondjs/respond.min.js"></script>
<script src="/lib/pmdynaform/libs/html5shiv/html5shiv.js"></script>
<script type="text/javascript">
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
</script>

View File

@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="login" version="1.0" basedir="" xmlform_type="NORMAL" width="400px" enabletemplate="1">
<BROWSER_TIME_ZONE_OFFSET type="hidden" />
<TITLE type="title">
<en><![CDATA[Login]]></en>
</TITLE>
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any" autocomplete="0">
<en><![CDATA[User]]></en>
</USR_USERNAME>
<USR_PASSWORD type="text" size="30" maxlength="32" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD>
<USR_PASSWORD_MASK type="password" size="30" maxlength="100" autocomplete="0">
<en><![CDATA[Password]]></en>
</USR_PASSWORD_MASK>
<USER_LANG type="dropdown" sqlconnection="dbarray">
SELECT LANG_ID, LANG_NAME FROM langOptions
<en><![CDATA[Language]]></en>
</USER_LANG>
<URL type="hidden"/>
<LOGIN_VERIFY_MSG type="private" showInTable="0"/>
<BSUBMIT type="button">
<en><![CDATA[Login]]></en>
</BSUBMIT>
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135">
<en><![CDATA[Forgot Password]]></en>
</FORGOT_PASWORD_LINK>
<JS type="javascript"><![CDATA[
//validate iframe login
if(inIframe() && (window.location.search.indexOf("inIFrame=1")===-1)) {
if (PM.Sessions.getCookie('PM-TabPrimary') !== '101010010'
&& (window.location.pathname.indexOf("login/login") !== -1
|| window.location.pathname.indexOf("sysLogin") !== -1)) {
window.top.location.href = window.location.pathname;
}
}
function inIframe () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
};
function getElementsByClassNameIE8(node, classname) {
var a = [];
var re = new RegExp('(^| )'+classname+'( |$)');
var els = node.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
if(re.test(els[i].className))a.push(els[i]);
return a;
};
window.onload= function(){
var inputUser,
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');
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');
}
});
}else{
document.getElementById('form[USR_USERNAME]').placeholder = _('ID_USER');
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');
}
};
// delete or not forgot password link
if(flagForgotPassword != 'on' && flagForgotPassword != '1') {
var element = document.getElementById("form[FORGOT_PASWORD_LINK]");
element.parentNode.removeChild(element);
}
var panel;
function showGettingStarted() {
panel = new leimnud.module.panel();
panel.options = {
size: {w:620,h:500},
position: {x:50,y:50,center:true},
control: {close:true,resize:false, drag: false},fx:{modal:true},
statusBar: false,
fx: {shadow:true,modal:true}
};
panel.make();
panel.loader.show();
var r = new leimnud.module.rpc.xmlhttp({
url:"../services/login_getStarted.php",
method:"POST"
});
r.callback = function(rpc) {
panel.loader.hide();
panel.addContent(rpc.xmlhttp.responseText);
};
r.make();
};
var saveConfig = function() {
if (document.getElementById("getStarted").checked == true) {
var oRPC = new leimnud.module.rpc.xmlhttp({
url: '../login/login_Ajax',
async: false,
method: 'POST',
args: 'function=getStarted_save'
});
oRPC.make();
}
panel.remove();
}
var dynaformOnload = function() {
setFocus(getField('USR_USERNAME'));
if (flagGettingStarted) {
showGettingStarted();
}
};
leimnud.event.add(document.getElementById('form[USR_PASSWORD_MASK]'), 'keypress', function(event) {
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = event.which; //firefox
if(key == 13) {
document.getElementById('form[BSUBMIT]').click();
return true;
} else {
return true;
}
});
leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() {
setNestedProperty(this, Array("disabled"), "true");
setNestedProperty(this, Array("value"), @@LOGIN_VERIFY_MSG);
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.login.submit();
}.extend(document.getElementById('form[BSUBMIT]')));
]]></JS>
</dynaForm>