mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02:00
Etemplate: Password widget now auto-updates the second 'confirm' password if you have two and suggest a password.
This commit is contained in:
parent
6d2af76576
commit
b6e47f9b11
@ -906,16 +906,6 @@ var AddressbookApp = /** @class */ (function (_super) {
|
|||||||
AddressbookApp.prototype.account_change = function (_ev, _widget) {
|
AddressbookApp.prototype.account_change = function (_ev, _widget) {
|
||||||
switch (_widget.id) {
|
switch (_widget.id) {
|
||||||
case 'account_passwd':
|
case 'account_passwd':
|
||||||
debugger;
|
|
||||||
// If they clicked suggest, copy it to password 2
|
|
||||||
if (_widget && _widget.options.viewable) {
|
|
||||||
var p2 = _widget.getParent().getWidgetById('account_passwd_2');
|
|
||||||
p2.set_viewable(true); // Allow viewing password
|
|
||||||
p2.toggle_visibility(true); // Actually show it
|
|
||||||
p2.set_value(_widget.getValue());
|
|
||||||
_widget.options.viewable = false;
|
|
||||||
}
|
|
||||||
// Fall through
|
|
||||||
case 'account_lid':
|
case 'account_lid':
|
||||||
case 'n_family':
|
case 'n_family':
|
||||||
case 'n_given':
|
case 'n_given':
|
||||||
|
@ -1102,17 +1102,6 @@ class AddressbookApp extends EgwApp
|
|||||||
switch(_widget.id)
|
switch(_widget.id)
|
||||||
{
|
{
|
||||||
case 'account_passwd':
|
case 'account_passwd':
|
||||||
debugger;
|
|
||||||
// If they clicked suggest, copy it to password 2
|
|
||||||
if(_widget && _widget.options.viewable)
|
|
||||||
{
|
|
||||||
let p2 = _widget.getParent().getWidgetById('account_passwd_2');
|
|
||||||
p2.set_viewable(true); // Allow viewing password
|
|
||||||
p2.toggle_visibility(true); // Actually show it
|
|
||||||
p2.set_value(_widget.getValue());
|
|
||||||
_widget.options.viewable = false;
|
|
||||||
}
|
|
||||||
// Fall through
|
|
||||||
case 'account_lid':
|
case 'account_lid':
|
||||||
case 'n_family':
|
case 'n_family':
|
||||||
case 'n_given':
|
case 'n_given':
|
||||||
|
@ -221,6 +221,13 @@ var et2_password = /** @class */ (function (_super) {
|
|||||||
this.encrypted = false;
|
this.encrypted = false;
|
||||||
this.input.val(suggestion);
|
this.input.val(suggestion);
|
||||||
this.input.trigger('change');
|
this.input.trigger('change');
|
||||||
|
// Check for second password, update it too
|
||||||
|
var two = this.getParent().getWidgetById(this.id + '_2');
|
||||||
|
if (two && two.getType() == this.getType()) {
|
||||||
|
two.options.viewable = true;
|
||||||
|
two.toggle_visibility(true);
|
||||||
|
two.set_value(suggestion);
|
||||||
|
}
|
||||||
}, this, true, this).sendRequest();
|
}, this, true, this).sendRequest();
|
||||||
};
|
};
|
||||||
et2_password.prototype.destroy = function () {
|
et2_password.prototype.destroy = function () {
|
||||||
|
@ -300,6 +300,15 @@ export class et2_password extends et2_textbox
|
|||||||
this.encrypted = false;
|
this.encrypted = false;
|
||||||
this.input.val(suggestion);
|
this.input.val(suggestion);
|
||||||
this.input.trigger('change');
|
this.input.trigger('change');
|
||||||
|
|
||||||
|
// Check for second password, update it too
|
||||||
|
let two = this.getParent().getWidgetById(this.id+'_2');
|
||||||
|
if(two && two.getType() == this.getType())
|
||||||
|
{
|
||||||
|
two.options.viewable = true;
|
||||||
|
two.toggle_visibility(true);
|
||||||
|
two.set_value(suggestion);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
this,true,this
|
this,true,this
|
||||||
).sendRequest();
|
).sendRequest();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user