Merged in norah/processmaker/PM-1395 (pull request #1369)
PM-1395 Se necesita que el campo: "From Mail" y habilitar "ServerEmailForDefault"
This commit is contained in:
@@ -38,10 +38,22 @@ emailServer.application = {
|
|||||||
//Data
|
//Data
|
||||||
var p;
|
var p;
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
if (Ext.getCmp("chkEmailServerDefault").checked) {
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
var emailDefault = 1;
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
} else {
|
||||||
|
var emailDefault = 0;
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
switch (option) {
|
switch (option) {
|
||||||
|
|
||||||
case "INS":
|
case "INS":
|
||||||
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
||||||
|
|
||||||
|
|
||||||
if (typeEmailEngine == "PHPMAILER") {
|
if (typeEmailEngine == "PHPMAILER") {
|
||||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||||
@@ -60,7 +72,7 @@ emailServer.application = {
|
|||||||
smtpSecure: smtpSecure,
|
smtpSecure: smtpSecure,
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
//MAIL
|
//MAIL
|
||||||
@@ -72,7 +84,7 @@ emailServer.application = {
|
|||||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -98,7 +110,7 @@ emailServer.application = {
|
|||||||
smtpSecure: smtpSecure,
|
smtpSecure: smtpSecure,
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
//MAIL
|
//MAIL
|
||||||
@@ -111,7 +123,7 @@ emailServer.application = {
|
|||||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -144,7 +156,7 @@ emailServer.application = {
|
|||||||
smtpSecure: smtpSecure,
|
smtpSecure: smtpSecure,
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
//MAIL
|
//MAIL
|
||||||
@@ -156,7 +168,7 @@ emailServer.application = {
|
|||||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||||
emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0
|
emailServerDefault: emailDefault
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -251,7 +263,9 @@ emailServer.application = {
|
|||||||
|
|
||||||
Ext.getCmp("txtMailTo").setValue("");
|
Ext.getCmp("txtMailTo").setValue("");
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
Ext.getCmp("chkEmailServerDefault").setValue(false);
|
Ext.getCmp("chkEmailServerDefault").setValue(false);
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
winData.setTitle(_("ID_EMAIL_SERVER_NEW"));
|
winData.setTitle(_("ID_EMAIL_SERVER_NEW"));
|
||||||
winData.setDisabled(false);
|
winData.setDisabled(false);
|
||||||
@@ -287,7 +301,16 @@ emailServer.application = {
|
|||||||
emailServerSetMailTo(Ext.getCmp("chkSendTestMail").checked);
|
emailServerSetMailTo(Ext.getCmp("chkSendTestMail").checked);
|
||||||
|
|
||||||
Ext.getCmp("txtMailTo").setValue(record.get("MAIL_TO"));
|
Ext.getCmp("txtMailTo").setValue(record.get("MAIL_TO"));
|
||||||
Ext.getCmp("chkEmailServerDefault").setValue((parseInt(record.get("MESS_DEFAULT")) == 1)? true : false);
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
if (parseInt(record.get("MESS_DEFAULT")) == 1) {
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
Ext.getCmp("chkEmailServerDefault").setValue(true);
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
} else {
|
||||||
|
Ext.getCmp("chkEmailServerDefault").setValue(false);
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
winData.setTitle(_("ID_EMAIL_SERVER_EDIT"));
|
winData.setTitle(_("ID_EMAIL_SERVER_EDIT"));
|
||||||
winData.setDisabled(false);
|
winData.setDisabled(false);
|
||||||
@@ -591,6 +614,7 @@ emailServer.application = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var txtAccountFrom = new Ext.form.TextField({
|
var txtAccountFrom = new Ext.form.TextField({
|
||||||
id: "txtAccountFrom",
|
id: "txtAccountFrom",
|
||||||
name: "txtAccountFrom",
|
name: "txtAccountFrom",
|
||||||
@@ -662,14 +686,14 @@ emailServer.application = {
|
|||||||
|
|
||||||
hidden: true
|
hidden: true
|
||||||
});
|
});
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
var chkEmailServerDefault = new Ext.form.Checkbox({
|
var chkEmailServerDefault = new Ext.form.Checkbox({
|
||||||
id: "chkEmailServerDefault",
|
id: "chkEmailServerDefault",
|
||||||
name: "chkEmailServerDefault",
|
name: "chkEmailServerDefault",
|
||||||
|
|
||||||
boxLabel: _("ID_EMAIL_SERVER_THIS_CONFIGURATION_IS_DEFAULT")
|
boxLabel: _("ID_EMAIL_SERVER_THIS_CONFIGURATION_IS_DEFAULT")
|
||||||
});
|
});
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
var btnTest = new Ext.Action({
|
var btnTest = new Ext.Action({
|
||||||
id: "btnTest",
|
id: "btnTest",
|
||||||
text: _("ID_TEST"),
|
text: _("ID_TEST"),
|
||||||
@@ -760,8 +784,11 @@ emailServer.application = {
|
|||||||
txtFromName,
|
txtFromName,
|
||||||
rdoGrpSmtpSecure,
|
rdoGrpSmtpSecure,
|
||||||
chkSendTestMail,
|
chkSendTestMail,
|
||||||
txtMailTo,
|
txtMailTo
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
,
|
||||||
chkEmailServerDefault
|
chkEmailServerDefault
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user