PM-2107 Deshabilitar el autocompletado del login
This commit is contained in:
@@ -1109,6 +1109,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
|||||||
public $replaceTags = 0;
|
public $replaceTags = 0;
|
||||||
public $renderMode = '';
|
public $renderMode = '';
|
||||||
public $comma_separator = '.';
|
public $comma_separator = '.';
|
||||||
|
public $autocomplete = "on";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function render
|
* Function render
|
||||||
@@ -1121,6 +1122,13 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
|||||||
*/
|
*/
|
||||||
public function render ($value = null, $owner = null)
|
public function render ($value = null, $owner = null)
|
||||||
{
|
{
|
||||||
|
if ($this->autocomplete === '1') {
|
||||||
|
$this->autocomplete = "on";
|
||||||
|
} else {
|
||||||
|
if ($this->autocomplete === '0') {
|
||||||
|
$this->autocomplete = "off";
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($this->renderMode == '') {
|
if ($this->renderMode == '') {
|
||||||
$this->renderMode = $this->mode;
|
$this->renderMode = $this->mode;
|
||||||
}
|
}
|
||||||
@@ -1168,6 +1176,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
|
|||||||
$html .= 'id="form[' . $this->name . ']" ';
|
$html .= 'id="form[' . $this->name . ']" ';
|
||||||
$html .= 'name="form[' . $this->name . ']" ';
|
$html .= 'name="form[' . $this->name . ']" ';
|
||||||
$html .= 'type="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" ';
|
$html .= 'type="text" size="' . $this->size . '" maxlength="' . $this->maxLength . '" ';
|
||||||
|
$html .= 'autocomplete="' . $this->autocomplete . '" ';
|
||||||
$html .= 'value="' . $this->htmlentities( $value, ENT_QUOTES, 'utf-8' ) . '" ';
|
$html .= 'value="' . $this->htmlentities( $value, ENT_QUOTES, 'utf-8' ) . '" ';
|
||||||
$html .= 'style="' . $this->htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" ';
|
$html .= 'style="' . $this->htmlentities( $this->style, ENT_COMPAT, 'utf-8' ) . '" ';
|
||||||
$html .= 'onkeypress="' . $this->htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '" ';
|
$html .= 'onkeypress="' . $this->htmlentities( $onkeypress, ENT_COMPAT, 'utf-8' ) . '" ';
|
||||||
@@ -4827,23 +4836,23 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
//Year
|
//Year
|
||||||
%Y year with the century
|
%Y year with the century
|
||||||
%y year without the century (range 00 to 99)
|
%y year without the century (range 00 to 99)
|
||||||
//Month
|
//Month
|
||||||
%m month, range 01 to 12
|
%m month, range 01 to 12
|
||||||
%B full month name
|
%B full month name
|
||||||
%b abbreviated month name
|
%b abbreviated month name
|
||||||
//Day
|
//Day
|
||||||
%d the day of the month (range 01 to 31)
|
%d the day of the month (range 01 to 31)
|
||||||
%e the day of the month (range 1 to 31)
|
%e the day of the month (range 1 to 31)
|
||||||
//Hour
|
//Hour
|
||||||
%H hour, range 00 to 23 (24h format)
|
%H hour, range 00 to 23 (24h format)
|
||||||
%I hour, range 01 to 12 (12h format)
|
%I hour, range 01 to 12 (12h format)
|
||||||
%k hour, range 0 to 23 (24h format)
|
%k hour, range 0 to 23 (24h format)
|
||||||
%l hour, range 1 to 12 (12h format)
|
%l hour, range 1 to 12 (12h format)
|
||||||
//Min
|
//Min
|
||||||
%M minute, range 00 to 59
|
%M minute, range 00 to 59
|
||||||
//Sec
|
//Sec
|
||||||
%S seconds, range 00 to 59
|
%S seconds, range 00 to 59
|
||||||
*/
|
*/
|
||||||
function date_create_from_format( $dformat, $dvalue, $withHours = false )
|
function date_create_from_format( $dformat, $dvalue, $withHours = false )
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<TITLE type="title">
|
<TITLE type="title">
|
||||||
<en><![CDATA[I forgot my password]]></en>
|
<en><![CDATA[I forgot my password]]></en>
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any">
|
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
|
||||||
<en><![CDATA[User]]></en>
|
<en><![CDATA[User]]></en>
|
||||||
</USR_USERNAME>
|
</USR_USERNAME>
|
||||||
<USR_EMAIL type="text" size="30" required="true" maxlength="32">
|
<USR_EMAIL type="text" size="30" required="true" maxlength="32" autocomplete="0">
|
||||||
<en><![CDATA[Email]]></en>
|
<en><![CDATA[Email]]></en>
|
||||||
</USR_EMAIL>
|
</USR_EMAIL>
|
||||||
<URL type="hidden"/>
|
<URL type="hidden"/>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<td valign='top'>
|
<td valign='top'>
|
||||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" 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%">
|
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
|
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
|
||||||
@@ -15,8 +16,8 @@
|
|||||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_USERNAME}</td>
|
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_USERNAME}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='FormLabel' width="{$form_labelWidth}">{$USR_PASSWORD}</td>
|
<td class='FormLabel' width="{$form_labelWidth}">{$USR_PASSWORD_MASK}</td>
|
||||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_PASSWORD}</td>
|
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_PASSWORD_MASK}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='FormLabel' width="{$form_labelWidth}">{$USER_LANG}</td>
|
<td class='FormLabel' width="{$form_labelWidth}">{$USER_LANG}</td>
|
||||||
@@ -37,12 +38,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||||
</div>
|
</div></form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{$form.JS}
|
{$form.JS}
|
||||||
</script>
|
</script>
|
||||||
</form>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
|
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -3,19 +3,22 @@
|
|||||||
<TITLE type="title">
|
<TITLE type="title">
|
||||||
<en><![CDATA[Login]]></en>
|
<en><![CDATA[Login]]></en>
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any">
|
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any" autocomplete="0">
|
||||||
<en><![CDATA[User]]></en>
|
<en><![CDATA[User]]></en>
|
||||||
</USR_USERNAME>
|
</USR_USERNAME>
|
||||||
<USR_PASSWORD type="password" size="30" maxlength="32" autocomplete="0">
|
<USR_PASSWORD type="text" size="30" maxlength="32" autocomplete="0">
|
||||||
<en><![CDATA[Password]]></en>
|
<en><![CDATA[Password]]></en>
|
||||||
</USR_PASSWORD>
|
</USR_PASSWORD>
|
||||||
|
<USR_PASSWORD_MASK type="password" size="30" maxlength="32" autocomplete="0">
|
||||||
|
<en><![CDATA[Password]]></en>
|
||||||
|
</USR_PASSWORD_MASK>
|
||||||
<USER_LANG type="dropdown" sqlconnection="dbarray">
|
<USER_LANG type="dropdown" sqlconnection="dbarray">
|
||||||
SELECT LANG_ID, LANG_NAME FROM langOptions
|
SELECT LANG_ID, LANG_NAME FROM langOptions
|
||||||
<en><![CDATA[Language]]></en>
|
<en><![CDATA[Language]]></en>
|
||||||
</USER_LANG>
|
</USER_LANG>
|
||||||
<URL type="hidden"/>
|
<URL type="hidden"/>
|
||||||
<LOGIN_VERIFY_MSG type="private" showInTable="0"/>
|
<LOGIN_VERIFY_MSG type="private" showInTable="0"/>
|
||||||
<BSUBMIT type="submit">
|
<BSUBMIT type="button">
|
||||||
<en><![CDATA[Login]]></en>
|
<en><![CDATA[Login]]></en>
|
||||||
</BSUBMIT>
|
</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" style="display:none;">
|
||||||
@@ -84,14 +87,11 @@ var dynaformOnload = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() {
|
leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function() {
|
||||||
setNestedProperty(this, Array('disabled'), 'true');
|
document.getElementById('form[USR_PASSWORD]').value = document.getElementById('form[USR_PASSWORD_MASK]').value;
|
||||||
setNestedProperty(this, Array('value'), @@LOGIN_VERIFY_MSG);
|
document.getElementById('form[USR_PASSWORD_MASK]').value = '';
|
||||||
|
document.getElementById('form[USR_PASSWORD_MASK]').setAttribute('type', 'text');
|
||||||
var client = getBrowserClient();
|
document.login.submit();
|
||||||
|
//return true;
|
||||||
if (client.browser != "firefox") {
|
|
||||||
document.login.submit();
|
|
||||||
}
|
|
||||||
}.extend(document.getElementById('form[BSUBMIT]')));
|
}.extend(document.getElementById('form[BSUBMIT]')));
|
||||||
|
|
||||||
]]></JS>
|
]]></JS>
|
||||||
|
|||||||
@@ -3,20 +3,23 @@
|
|||||||
<TITLE type="title">
|
<TITLE type="title">
|
||||||
<en><![CDATA[Login]]></en>
|
<en><![CDATA[Login]]></en>
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any">
|
<USR_USERNAME type="text" size="30" maxlength="50" validate="Any" autocomplete="0">
|
||||||
<en><![CDATA[User]]></en>
|
<en><![CDATA[User]]></en>
|
||||||
</USR_USERNAME>
|
</USR_USERNAME>
|
||||||
<USR_PASSWORD type="password" size="30" maxlength="32" autocomplete="0">
|
<USR_PASSWORD type="hidden" size="30" maxlength="32" autocomplete="0">
|
||||||
<en><![CDATA[Password]]></en>
|
<en><![CDATA[Password]]></en>
|
||||||
</USR_PASSWORD>
|
</USR_PASSWORD>
|
||||||
<USER_ENV type="text" size="30" maxlength="50">
|
<USR_PASSWORD_MASK type="password" size="30" maxlength="32" autocomplete="0">
|
||||||
|
<en><![CDATA[Password]]></en>
|
||||||
|
</USR_PASSWORD_MASK>
|
||||||
|
<USER_ENV type="text" size="30" maxlength="50" autocomplete="0">
|
||||||
<en><![CDATA[Workspace]]></en>
|
<en><![CDATA[Workspace]]></en>
|
||||||
</USER_ENV>
|
</USER_ENV>
|
||||||
<USER_LANG type="dropdown" sqlconnection="dbarray">
|
<USER_LANG type="dropdown" sqlconnection="dbarray">
|
||||||
SELECT LANG_ID, LANG_NAME FROM langOptions
|
SELECT LANG_ID, LANG_NAME FROM langOptions
|
||||||
<en><![CDATA[Language]]></en>
|
<en><![CDATA[Language]]></en>
|
||||||
</USER_LANG>
|
</USER_LANG>
|
||||||
<BSUBMIT type="submit">
|
<BSUBMIT type="button">
|
||||||
<en><![CDATA[Login]]></en>
|
<en><![CDATA[Login]]></en>
|
||||||
</BSUBMIT>
|
</BSUBMIT>
|
||||||
<JS type="javascript"><![CDATA[
|
<JS type="javascript"><![CDATA[
|
||||||
@@ -28,10 +31,17 @@ leimnud.event.add(document.getElementById('form[BSUBMIT]'), 'click', function()
|
|||||||
ws = getField('USER_ENV').value;
|
ws = getField('USER_ENV').value;
|
||||||
createCookie('pmos_generik2', '{"ws":"'+ws+'"}', 365);
|
createCookie('pmos_generik2', '{"ws":"'+ws+'"}', 365);
|
||||||
|
|
||||||
|
/*
|
||||||
var client = getBrowserClient();
|
var client = getBrowserClient();
|
||||||
if (client.browser == "msie" || client.browser == "safari"){
|
if (client.browser == "msie" || client.browser == "safari"){
|
||||||
document.sysLogin.submit();
|
document.sysLogin.submit();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
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.sysLogin.submit();
|
||||||
}.extend(document.getElementById('form[BSUBMIT]')));
|
}.extend(document.getElementById('form[BSUBMIT]')));
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|||||||
Reference in New Issue
Block a user