mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSformElement::password: fix some jshint errors
This commit is contained in:
parent
dde982f42c
commit
f66b7186e8
1 changed files with 15 additions and 15 deletions
|
@ -8,7 +8,7 @@ var LSformElement_password_field = new Class({
|
|||
|
||||
initialiseLSformElement_password_field: function() {
|
||||
// ViewHashBtn
|
||||
if (this.params['viewHash'] && varLSform.objectdn!= "") {
|
||||
if (this.params.viewHash && varLSform.objectdn!= "") {
|
||||
this.viewHashBtn = new Element('img');
|
||||
this.viewHashBtn.src = varLSdefault.imagePath('view_hash');
|
||||
this.viewHashBtn.addClass('btn');
|
||||
|
@ -18,8 +18,8 @@ var LSformElement_password_field = new Class({
|
|||
}
|
||||
|
||||
// Mail
|
||||
if (this.params['mail']) {
|
||||
if ((this.params.mail['canEdit']==1)||(!$type(this.params.mail['canEdit']))) {
|
||||
if (this.params.mail) {
|
||||
if ((this.params.mail.canEdit==1)||(!$type(this.params.mail.canEdit))) {
|
||||
this.editMailBtn = new Element('img');
|
||||
this.editMailBtn.src = varLSdefault.imagePath('mail-edit');
|
||||
this.editMailBtn.addClass('btn');
|
||||
|
@ -28,7 +28,7 @@ var LSformElement_password_field = new Class({
|
|||
this.editMailBtn.injectAfter(this.input);
|
||||
varLSdefault.addHelpInfo(this.editMailBtn,'LSformElement_password','editmail');
|
||||
}
|
||||
if (this.params.mail['ask']) {
|
||||
if (this.params.mail.ask) {
|
||||
this.mailBtn = new Element('img');
|
||||
this.mailBtn.addClass('btn');
|
||||
this.mailBtn.addEvent('click',this.onMailBtnClick.bind(this));
|
||||
|
@ -37,7 +37,7 @@ var LSformElement_password_field = new Class({
|
|||
name: 'LSformElement_password_' + this.name + '_send',
|
||||
type: 'hidden'
|
||||
});
|
||||
if (this.params.mail['send']) {
|
||||
if (this.params.mail.send) {
|
||||
this.mailInput.value = 1;
|
||||
this.mailBtn.src = varLSdefault.imagePath('mail');
|
||||
varLSdefault.addHelpInfo(this.mailBtn,'LSformElement_password','mail');
|
||||
|
@ -54,7 +54,7 @@ var LSformElement_password_field = new Class({
|
|||
|
||||
// ViewBtn
|
||||
this.viewBtn = new Element('img');
|
||||
if (this.params['clearEdit']) {
|
||||
if (this.params.clearEdit) {
|
||||
this.viewBtn.src = varLSdefault.imagePath('hide');
|
||||
varLSdefault.addHelpInfo(this.viewBtn,'LSformElement_password','hide');
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ var LSformElement_password_field = new Class({
|
|||
this.viewBtn.injectAfter(this.input);
|
||||
|
||||
// Verify
|
||||
if (this.params['verify']) {
|
||||
if (this.params.verify) {
|
||||
this.bgColor = this.input.getStyle('background-color');
|
||||
this.verifyFx = new Fx.Tween(this.input,{property: 'background-color',duration:600});
|
||||
this.verifyBtn = new Element('img');
|
||||
|
@ -78,7 +78,7 @@ var LSformElement_password_field = new Class({
|
|||
varLSdefault.addHelpInfo(this.verifyBtn,'LSformElement_password','verify');
|
||||
}
|
||||
|
||||
if (this.params['generate']) {
|
||||
if (this.params.generate) {
|
||||
this.generateBtn = new Element('img');
|
||||
this.generateBtn.src = varLSdefault.imagePath('generate');
|
||||
this.generateBtn.addClass('btn');
|
||||
|
@ -108,7 +108,7 @@ var LSformElement_password_field = new Class({
|
|||
|
||||
initialize_input: function() {
|
||||
// Verify
|
||||
if (this.params['verify']) {
|
||||
if (this.params.verify) {
|
||||
this.verifyFx = new Fx.Tween(this.input,{property: 'background-color',duration:600});
|
||||
}
|
||||
},
|
||||
|
@ -133,20 +133,20 @@ var LSformElement_password_field = new Class({
|
|||
this.LSmail.addEvent('valid',this.onLSmailValid.bind(this));
|
||||
}
|
||||
|
||||
var mails = []
|
||||
if ($type(this.params.mail['mail_attr'])=='array') {
|
||||
this.params.mail['mail_attr'].each(function(a) {
|
||||
var mails = [];
|
||||
if ($type(this.params.mail.mail_attr)=='array') {
|
||||
this.params.mail.mail_attr.each(function(a) {
|
||||
this.append(varLSform.getValue(a));
|
||||
},mails);
|
||||
}
|
||||
else {
|
||||
mails.append(varLSform.getValue(this.params.mail['mail_attr']));
|
||||
mails.append(varLSform.getValue(this.params.mail.mail_attr));
|
||||
}
|
||||
|
||||
this.LSmail_open = 1;
|
||||
this.LSmail.setMails(mails);
|
||||
this.LSmail.setSubject(this.params.mail['subject']);
|
||||
this.LSmail.setMsg(this.params.mail['msg']);
|
||||
this.LSmail.setSubject(this.params.mail.subject);
|
||||
this.LSmail.setMsg(this.params.mail.msg);
|
||||
this.LSmail.open(this.editMailBtn);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue