BUG 9681 "Cuando se quiere configurar el email con una..." SOLVED
- Clearing the "Account From" field in ADMIN>Settings>Email not cleared the password - Problem solved by deleting the "Account From" field is automatically deleted the password * Available from version 2.0.44
This commit is contained in:
@@ -11,19 +11,19 @@ Ext.onReady(function(){
|
|||||||
combo.setVisible(true);
|
combo.setVisible(true);
|
||||||
combo.getEl().up('.x-form-item').setDisplayed(true); // show label
|
combo.getEl().up('.x-form-item').setDisplayed(true); // show label
|
||||||
|
|
||||||
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
||||||
Ext.getCmp('Server').setVisible(false);
|
Ext.getCmp('Server').setVisible(false);
|
||||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Port').setVisible(false);
|
Ext.getCmp('Port').setVisible(false);
|
||||||
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('RequireAuthentication').setVisible(false);
|
Ext.getCmp('RequireAuthentication').setVisible(false);
|
||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('AccountFrom').setVisible(false);
|
Ext.getCmp('AccountFrom').setVisible(false);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Password').setVisible(false);
|
Ext.getCmp('Password').setVisible(false);
|
||||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
} else {
|
} else {
|
||||||
Ext.getCmp('Server').setVisible(true);
|
Ext.getCmp('Server').setVisible(true);
|
||||||
@@ -34,7 +34,7 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
Ext.getCmp('AccountFrom').setVisible(true);
|
Ext.getCmp('AccountFrom').setVisible(true);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
|
|
||||||
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
||||||
{
|
{
|
||||||
Ext.getCmp('Password').setVisible(true);
|
Ext.getCmp('Password').setVisible(true);
|
||||||
@@ -47,50 +47,50 @@ Ext.onReady(function(){
|
|||||||
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
||||||
Ext.getCmp('UseSecureConnection').setValue('No');
|
Ext.getCmp('UseSecureConnection').setValue('No');
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(true);
|
Ext.getCmp('UseSecureConnection').setVisible(true);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('SendaTestMail').setVisible(true);
|
Ext.getCmp('SendaTestMail').setVisible(true);
|
||||||
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
|
|
||||||
if(Ext.getCmp('SendaTestMail').checked) {
|
if(Ext.getCmp('SendaTestMail').checked) {
|
||||||
Ext.getCmp('eMailto').setVisible(true);
|
Ext.getCmp('eMailto').setVisible(true);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.getCmp('eMailto').setVisible(false);
|
Ext.getCmp('eMailto').setVisible(false);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('eMailto').setValue(' ');
|
Ext.getCmp('eMailto').setValue(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
combo.setVisible(false);
|
combo.setVisible(false);
|
||||||
combo.getEl().up('.x-form-item').setDisplayed(false); // hide label
|
combo.getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Server').setVisible(false);
|
Ext.getCmp('Server').setVisible(false);
|
||||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Port').setVisible(false);
|
Ext.getCmp('Port').setVisible(false);
|
||||||
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('RequireAuthentication').setVisible(false);
|
Ext.getCmp('RequireAuthentication').setVisible(false);
|
||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('AccountFrom').setVisible(false);
|
Ext.getCmp('AccountFrom').setVisible(false);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Password').setVisible(false);
|
Ext.getCmp('Password').setVisible(false);
|
||||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('SendaTestMail').setVisible(false);
|
Ext.getCmp('SendaTestMail').setVisible(false);
|
||||||
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
|
|
||||||
if (Ext.getCmp('SendaTestMail').getValue().checked) {
|
if (Ext.getCmp('SendaTestMail').getValue().checked) {
|
||||||
Ext.getCmp('eMailto').setVisible(true);
|
Ext.getCmp('eMailto').setVisible(true);
|
||||||
Ext.getCmp('eMailto').setVisible(true);
|
Ext.getCmp('eMailto').setVisible(true);
|
||||||
Ext.getCmp('eMailto').setValue('');
|
Ext.getCmp('eMailto').setValue('');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.getCmp('eMailto').setVisible(false);
|
Ext.getCmp('eMailto').setVisible(false);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('eMailto').setValue(' ');
|
Ext.getCmp('eMailto').setValue(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||||
@@ -100,46 +100,46 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var EmailEngine = new Ext.data.SimpleStore({
|
var EmailEngine = new Ext.data.SimpleStore({
|
||||||
fields: ['id', 'EmailEngine'],
|
fields: ['id', 'EmailEngine'],
|
||||||
data : [
|
data : [
|
||||||
['PHPMAILER','SMTP (PHPMailer)'],
|
['PHPMAILER','SMTP (PHPMailer)'],
|
||||||
['MAIL','Mail (PHP)']
|
['MAIL','Mail (PHP)']
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
var combo = new Ext.form.ComboBox({
|
var combo = new Ext.form.ComboBox({
|
||||||
id:'EmailEngine',
|
id:'EmailEngine',
|
||||||
name:'EmailEngine',
|
name:'EmailEngine',
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
fieldLabel: _('EMAIL_ENGINE'),//'Email Engine',
|
fieldLabel: _('EMAIL_ENGINE'),//'Email Engine',
|
||||||
blankText: '',
|
blankText: '',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
lazyRender: true,
|
lazyRender: true,
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
selectOnFocus: true,
|
selectOnFocus: true,
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
store:EmailEngine,
|
store:EmailEngine,
|
||||||
displayField:'EmailEngine',
|
displayField:'EmailEngine',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
value: 'PHPMAILER',
|
value: 'PHPMAILER',
|
||||||
disabled : true,
|
disabled : true,
|
||||||
listeners: {
|
listeners: {
|
||||||
select: function(combo, value) {
|
select: function(combo, value) {
|
||||||
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
||||||
Ext.getCmp('Server').setVisible(false);
|
Ext.getCmp('Server').setVisible(false);
|
||||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Port').setVisible(false);
|
Ext.getCmp('Port').setVisible(false);
|
||||||
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('RequireAuthentication').setVisible(false);
|
Ext.getCmp('RequireAuthentication').setVisible(false);
|
||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('AccountFrom').setVisible(false);
|
Ext.getCmp('AccountFrom').setVisible(false);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Password').setVisible(false);
|
Ext.getCmp('Password').setVisible(false);
|
||||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
} else {
|
} else {
|
||||||
Ext.getCmp('Server').setVisible(true);
|
Ext.getCmp('Server').setVisible(true);
|
||||||
@@ -150,7 +150,7 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
Ext.getCmp('AccountFrom').setVisible(true);
|
Ext.getCmp('AccountFrom').setVisible(true);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
|
|
||||||
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
||||||
{
|
{
|
||||||
Ext.getCmp('Password').setVisible(true);
|
Ext.getCmp('Password').setVisible(true);
|
||||||
@@ -163,13 +163,13 @@ Ext.onReady(function(){
|
|||||||
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
||||||
Ext.getCmp('UseSecureConnection').setValue('No');
|
Ext.getCmp('UseSecureConnection').setValue('No');
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(true);
|
Ext.getCmp('UseSecureConnection').setVisible(true);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
}
|
}
|
||||||
Ext.getCmp('SaveChanges').disable();
|
Ext.getCmp('SaveChanges').disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var tb = new Ext.Toolbar({
|
var tb = new Ext.Toolbar({
|
||||||
style : 'background: #EEEEEE;',
|
style : 'background: #EEEEEE;',
|
||||||
@@ -216,13 +216,13 @@ Ext.onReady(function(){
|
|||||||
var EMailFields = new Ext.form.FieldSet({
|
var EMailFields = new Ext.form.FieldSet({
|
||||||
title: _('ID_CONFIGURATION'),
|
title: _('ID_CONFIGURATION'),
|
||||||
items : [
|
items : [
|
||||||
box,
|
box,
|
||||||
combo,
|
combo,
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
hideLabel : false,
|
hideLabel : false,
|
||||||
fieldLabel: _('ID_SERVER'),//'Server',
|
fieldLabel: _('ID_SERVER'),//'Server',
|
||||||
id:'Server',
|
id:'Server',
|
||||||
//blankText: 'Server',
|
//blankText: 'Server',
|
||||||
width: 200,
|
width: 200,
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
@@ -237,16 +237,16 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
fieldLabel: _('PORT_DEFAULT'),//'Port (default 25)',
|
fieldLabel: _('PORT_DEFAULT'),//'Port (default 25)',
|
||||||
id:'Port',
|
id:'Port',
|
||||||
name:'Port',
|
name:'Port',
|
||||||
emptyText : null,
|
emptyText : null,
|
||||||
width: 40,
|
width: 40,
|
||||||
maxLength: 3,
|
maxLength: 3,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
boxLabel: _('REQUIRE_AUTHENTICATION'),//'Require authentication',
|
boxLabel: _('REQUIRE_AUTHENTICATION'),//'Require authentication',
|
||||||
@@ -274,7 +274,42 @@ Ext.onReady(function(){
|
|||||||
vtype:'email',
|
vtype:'email',
|
||||||
width: 200,
|
width: 200,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false,
|
||||||
|
enableKeyEvents: true,
|
||||||
|
listeners: {
|
||||||
|
keydown: function (txt, e) {
|
||||||
|
switch (e.getKey()) {
|
||||||
|
case 8: //Delete
|
||||||
|
case 46: //Supr
|
||||||
|
if (Ext.getCmp("AccountFrom").getValue() == "") {
|
||||||
|
Ext.getCmp("Password").setValue("");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
keyup: function (txt, e) {
|
||||||
|
var strValue = Ext.getCmp("AccountFrom").getValue();
|
||||||
|
var sw = 0;
|
||||||
|
|
||||||
|
switch (e.getKey()) {
|
||||||
|
case 8: //Delete
|
||||||
|
case 46: //Supr
|
||||||
|
if (strValue == "") {
|
||||||
|
sw = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (strValue.length <= 1) {
|
||||||
|
sw = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sw == 1) {
|
||||||
|
Ext.getCmp("Password").setValue("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
@@ -289,61 +324,61 @@ Ext.onReady(function(){
|
|||||||
allowBlank: true
|
allowBlank: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: _('ID_PASSWORD'),//'Password',
|
fieldLabel: _('ID_PASSWORD'),//'Password',
|
||||||
id:'Password',
|
id:'Password',
|
||||||
name:'Password',
|
name:'Password',
|
||||||
inputType: 'password',
|
inputType: 'password',
|
||||||
width: 200,
|
width: 200,
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
listeners : {
|
listeners : {
|
||||||
'change' : function() {
|
'change' : function() {
|
||||||
if (Ext.getCmp('Password').getValue() != '') {
|
if (Ext.getCmp('Password').getValue() != '') {
|
||||||
Ext.getCmp('PasswordHide').setValue('');
|
Ext.getCmp('PasswordHide').setValue('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
boxLabel: _('SEND_TEST_MAIL'),//'Send a test mail' ,
|
boxLabel: _('SEND_TEST_MAIL'),//'Send a test mail' ,
|
||||||
id:'SendaTestMail',
|
id:'SendaTestMail',
|
||||||
name:'SendaTestMail',
|
name:'SendaTestMail',
|
||||||
disabled : true,
|
disabled : true,
|
||||||
listeners: {
|
listeners: {
|
||||||
check: function(EnableEmailNotifications, checked) {
|
check: function(EnableEmailNotifications, checked) {
|
||||||
if(checked) {
|
if(checked) {
|
||||||
Ext.getCmp('eMailto').setVisible(true);
|
Ext.getCmp('eMailto').setVisible(true);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
Ext.getCmp('eMailto').setValue('');
|
Ext.getCmp('eMailto').setValue('');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Ext.getCmp('eMailto').setVisible(false);
|
Ext.getCmp('eMailto').setVisible(false);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('eMailto').setValue(' ');
|
Ext.getCmp('eMailto').setValue(' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: _('MAIL_TO'),//'Mail to',
|
fieldLabel: _('MAIL_TO'),//'Mail to',
|
||||||
id:'eMailto',
|
id:'eMailto',
|
||||||
name:'eMailto',
|
name:'eMailto',
|
||||||
width: 200,
|
width: 200,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:'UseSecureConnection',
|
id:'UseSecureConnection',
|
||||||
name:'UseSecureConnection',
|
name:'UseSecureConnection',
|
||||||
xtype: 'radiogroup',
|
xtype: 'radiogroup',
|
||||||
fieldLabel: _('USE_SECURE_CONNECTION'),//'Use Secure Connection',
|
fieldLabel: _('USE_SECURE_CONNECTION'),//'Use Secure Connection',
|
||||||
columns: 3,
|
columns: 3,
|
||||||
width: 200,
|
width: 200,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
vertical: true,
|
vertical: true,
|
||||||
items: [
|
items: [
|
||||||
{boxLabel: 'No',inputValue: 'No',name: 'UseSecureConnection',checked:true},
|
{boxLabel: 'No',inputValue: 'No',name: 'UseSecureConnection',checked:true},
|
||||||
{boxLabel: 'TLS', inputValue: 'tls',name: 'UseSecureConnection'},
|
{boxLabel: 'TLS', inputValue: 'tls',name: 'UseSecureConnection'},
|
||||||
@@ -357,27 +392,27 @@ Ext.onReady(function(){
|
|||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: '../adminProxy/loadFields',
|
url: '../adminProxy/loadFields',
|
||||||
params: { CFG_UID: 'Emails' },
|
params: { CFG_UID: 'Emails' },
|
||||||
success: function(r,o) {
|
success: function(r,o) {
|
||||||
var res = Ext.decode(r.responseText);
|
var res = Ext.decode(r.responseText);
|
||||||
if (! res.data)
|
if (! res.data)
|
||||||
return;
|
return;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
Ext.getCmp('EnableEmailNotifications').setValue(res.data.MESS_ENABLED);
|
Ext.getCmp('EnableEmailNotifications').setValue(res.data.MESS_ENABLED);
|
||||||
Ext.getCmp('EmailEngine').setValue(res.data.MESS_ENGINE);
|
Ext.getCmp('EmailEngine').setValue(res.data.MESS_ENGINE);
|
||||||
|
|
||||||
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
if (Ext.getCmp('EmailEngine').getValue()== 'MAIL') {
|
||||||
Ext.getCmp('Server').setVisible(false);
|
Ext.getCmp('Server').setVisible(false);
|
||||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Port').setVisible(false);
|
Ext.getCmp('Port').setVisible(false);
|
||||||
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('RequireAuthentication').setVisible(false);
|
Ext.getCmp('RequireAuthentication').setVisible(false);
|
||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('AccountFrom').setVisible(false);
|
Ext.getCmp('AccountFrom').setVisible(false);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Password').setVisible(false);
|
Ext.getCmp('Password').setVisible(false);
|
||||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
} else {
|
} else {
|
||||||
Ext.getCmp('Server').setVisible(true);
|
Ext.getCmp('Server').setVisible(true);
|
||||||
@@ -388,7 +423,7 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
Ext.getCmp('AccountFrom').setVisible(true);
|
Ext.getCmp('AccountFrom').setVisible(true);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
|
|
||||||
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
if (Ext.getCmp('RequireAuthentication').getValue() === true)
|
||||||
{
|
{
|
||||||
Ext.getCmp('Password').setVisible(true);
|
Ext.getCmp('Password').setVisible(true);
|
||||||
@@ -401,8 +436,8 @@ Ext.onReady(function(){
|
|||||||
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
if(!Ext.getCmp('UseSecureConnection').getValue()) {
|
||||||
Ext.getCmp('UseSecureConnection').setValue('No');
|
Ext.getCmp('UseSecureConnection').setValue('No');
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(true);
|
Ext.getCmp('UseSecureConnection').setVisible(true);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(true);
|
||||||
|
|
||||||
Ext.getCmp('Server').setValue(res.data.MESS_SERVER);
|
Ext.getCmp('Server').setValue(res.data.MESS_SERVER);
|
||||||
@@ -419,16 +454,16 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('UseSecureConnection').setValue(res.data.SMTPSecure);
|
Ext.getCmp('UseSecureConnection').setValue(res.data.SMTPSecure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.getCmp('SendaTestMail').setValue(res.data.MESS_TRY_SEND_INMEDIATLY);
|
Ext.getCmp('SendaTestMail').setValue(res.data.MESS_TRY_SEND_INMEDIATLY);
|
||||||
|
|
||||||
if(!res.data.MAIL_TO) {
|
if(!res.data.MAIL_TO) {
|
||||||
Ext.getCmp('eMailto').setValue(' ');
|
Ext.getCmp('eMailto').setValue(' ');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.getCmp('eMailto').setValue(res.data.MAIL_TO);
|
Ext.getCmp('eMailto').setValue(res.data.MAIL_TO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -444,33 +479,33 @@ Ext.onReady(function(){
|
|||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
// bodyStyle:'padding:2px',
|
// bodyStyle:'padding:2px',
|
||||||
waitMsgTarget : true,
|
waitMsgTarget : true,
|
||||||
frame: true,
|
frame: true,
|
||||||
defaults: {
|
defaults: {
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items: [EMailFields ]
|
items: [EMailFields ]
|
||||||
});
|
});
|
||||||
//render to process-panel
|
//render to process-panel
|
||||||
frm.render(document.body);
|
frm.render(document.body);
|
||||||
combo.setVisible(false);
|
combo.setVisible(false);
|
||||||
combo.getEl().up('.x-form-item').setDisplayed(false); // hide label
|
combo.getEl().up('.x-form-item').setDisplayed(false); // hide label
|
||||||
Ext.getCmp('Server').setVisible(false);
|
Ext.getCmp('Server').setVisible(false);
|
||||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Port').setVisible(false);
|
Ext.getCmp('Port').setVisible(false);
|
||||||
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Port').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('RequireAuthentication').setVisible(false);
|
Ext.getCmp('RequireAuthentication').setVisible(false);
|
||||||
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('RequireAuthentication').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('AccountFrom').setVisible(false);
|
Ext.getCmp('AccountFrom').setVisible(false);
|
||||||
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('AccountFrom').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Password').setVisible(false);
|
Ext.getCmp('Password').setVisible(false);
|
||||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('SendaTestMail').setVisible(false);
|
Ext.getCmp('SendaTestMail').setVisible(false);
|
||||||
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('SendaTestMail').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('eMailto').setVisible(false);
|
Ext.getCmp('eMailto').setVisible(false);
|
||||||
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('eMailto').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp('Test').setVisible(false);
|
Ext.getCmp('Test').setVisible(false);
|
||||||
Ext.getCmp('SaveChanges').setVisible(false);
|
Ext.getCmp('SaveChanges').setVisible(false);
|
||||||
@@ -481,13 +516,13 @@ Ext.onReady(function(){
|
|||||||
var testConnForm = new Ext.FormPanel({
|
var testConnForm = new Ext.FormPanel({
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
width:445,
|
width:445,
|
||||||
autoHeight:true,
|
autoHeight:true,
|
||||||
frame:true,
|
frame:true,
|
||||||
autoDestroy : true,
|
autoDestroy : true,
|
||||||
monitorValid : true,
|
monitorValid : true,
|
||||||
plain: true,
|
plain: true,
|
||||||
waitMsgTarget: true,
|
waitMsgTarget: true,
|
||||||
items:[{
|
items:[{
|
||||||
xtype : 'fieldset',
|
xtype : 'fieldset',
|
||||||
layout : 'form',
|
layout : 'form',
|
||||||
@@ -496,83 +531,83 @@ var testConnForm = new Ext.FormPanel({
|
|||||||
labelWidth:20,
|
labelWidth:20,
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'step1', width: 300,
|
id:'step1', width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'result1',
|
id:'result1',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'step2',
|
id:'step2',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'result2',
|
id:'result2',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'step3',
|
id:'step3',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'result3',
|
id:'result3',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'step4',
|
id:'step4',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'result4',
|
id:'result4',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'step5',
|
id:'step5',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'result5',
|
id:'result5',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text:_('ID_DONE'),
|
text:_('ID_DONE'),
|
||||||
id: 'done',
|
id: 'done',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
testEmailWindow.hide();
|
testEmailWindow.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -581,13 +616,13 @@ var testConnForm = new Ext.FormPanel({
|
|||||||
var testConnFormMail = new Ext.FormPanel({
|
var testConnFormMail = new Ext.FormPanel({
|
||||||
collapsible: false,
|
collapsible: false,
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
width:445,
|
width:445,
|
||||||
autoHeight:true,
|
autoHeight:true,
|
||||||
frame:true,
|
frame:true,
|
||||||
autoDestroy : true,
|
autoDestroy : true,
|
||||||
monitorValid : true,
|
monitorValid : true,
|
||||||
plain: true,
|
plain: true,
|
||||||
waitMsgTarget: true,
|
waitMsgTarget: true,
|
||||||
items:[{
|
items:[{
|
||||||
xtype : 'fieldset',
|
xtype : 'fieldset',
|
||||||
layout : 'form',
|
layout : 'form',
|
||||||
@@ -596,60 +631,60 @@ var testConnFormMail = new Ext.FormPanel({
|
|||||||
labelWidth:20,
|
labelWidth:20,
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'step11', width: 300,
|
id:'step11', width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'result11',
|
id:'result11',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
fieldLabel: ' ',
|
fieldLabel: ' ',
|
||||||
id:'step12',
|
id:'step12',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:''
|
labelSeparator:''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'label', fieldLabel: ' ',
|
xtype: 'label', fieldLabel: ' ',
|
||||||
id:'result12',
|
id:'result12',
|
||||||
width: 300,
|
width: 300,
|
||||||
labelSeparator:'',
|
labelSeparator:'',
|
||||||
style : 'font-size: 11px;'
|
style : 'font-size: 11px;'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text:_('ID_DONE'),
|
text:_('ID_DONE'),
|
||||||
id: 'doneMail',
|
id: 'doneMail',
|
||||||
handler: function(){
|
handler: function(){
|
||||||
testEmailWindowMail.hide();
|
testEmailWindowMail.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
var testEmailWindow = new Ext.Window({
|
var testEmailWindow = new Ext.Window({
|
||||||
width: 470,
|
width: 470,
|
||||||
closable:false,
|
closable:false,
|
||||||
plain: true,
|
plain: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
y: 82,
|
y: 82,
|
||||||
items: testConnForm
|
items: testConnForm
|
||||||
});
|
});
|
||||||
|
|
||||||
var testEmailWindowMail = new Ext.Window({
|
var testEmailWindowMail = new Ext.Window({
|
||||||
width: 470,
|
width: 470,
|
||||||
closable:false,
|
closable:false,
|
||||||
plain: true,
|
plain: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
y: 82,
|
y: 82,
|
||||||
items: testConnFormMail
|
items: testConnFormMail
|
||||||
});
|
});
|
||||||
@@ -660,20 +695,20 @@ var EditMethod = function()
|
|||||||
{
|
{
|
||||||
Ext.getCmp('EnableEmailNotifications').setDisabled(false);
|
Ext.getCmp('EnableEmailNotifications').setDisabled(false);
|
||||||
Ext.getCmp('EmailEngine').setDisabled(false);
|
Ext.getCmp('EmailEngine').setDisabled(false);
|
||||||
Ext.getCmp('Server').setDisabled(false);
|
Ext.getCmp('Server').setDisabled(false);
|
||||||
Ext.getCmp('Port').setDisabled(false);
|
Ext.getCmp('Port').setDisabled(false);
|
||||||
Ext.getCmp('RequireAuthentication').setDisabled(false);
|
Ext.getCmp('RequireAuthentication').setDisabled(false);
|
||||||
Ext.getCmp('AccountFrom').setDisabled(false);
|
Ext.getCmp('AccountFrom').setDisabled(false);
|
||||||
Ext.getCmp('Password').setDisabled(false);
|
Ext.getCmp('Password').setDisabled(false);
|
||||||
Ext.getCmp('SendaTestMail').setDisabled(false);
|
Ext.getCmp('SendaTestMail').setDisabled(false);
|
||||||
Ext.getCmp('eMailto').setDisabled(false);
|
Ext.getCmp('eMailto').setDisabled(false);
|
||||||
Ext.getCmp('UseSecureConnection').setDisabled(false);
|
Ext.getCmp('UseSecureConnection').setDisabled(false);
|
||||||
Ext.getCmp('Test').setVisible(true);
|
Ext.getCmp('Test').setVisible(true);
|
||||||
Ext.getCmp('SaveChanges').setVisible(true);
|
Ext.getCmp('SaveChanges').setVisible(true);
|
||||||
Ext.getCmp('UnEdit').setVisible(true);
|
Ext.getCmp('UnEdit').setVisible(true);
|
||||||
Ext.getCmp('Edit').setVisible(false);
|
Ext.getCmp('Edit').setVisible(false);
|
||||||
Ext.getCmp('label').setVisible(false);
|
Ext.getCmp('label').setVisible(false);
|
||||||
Ext.getCmp('labelUn').setVisible(true);
|
Ext.getCmp('labelUn').setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var UnEditMethod = function()
|
var UnEditMethod = function()
|
||||||
@@ -693,7 +728,7 @@ var UnEditMethod = function()
|
|||||||
Ext.getCmp('UnEdit').setVisible(false);
|
Ext.getCmp('UnEdit').setVisible(false);
|
||||||
Ext.getCmp('Edit').setVisible(true);
|
Ext.getCmp('Edit').setVisible(true);
|
||||||
Ext.getCmp('label').setVisible(true);
|
Ext.getCmp('label').setVisible(true);
|
||||||
Ext.getCmp('labelUn').setVisible(false);
|
Ext.getCmp('labelUn').setVisible(false);
|
||||||
}
|
}
|
||||||
var testMethod = function()
|
var testMethod = function()
|
||||||
{
|
{
|
||||||
@@ -701,8 +736,8 @@ var testMethod = function()
|
|||||||
switch (typeTest)
|
switch (typeTest)
|
||||||
{
|
{
|
||||||
case 'MAIL':
|
case 'MAIL':
|
||||||
if ( Ext.getCmp('SendaTestMail').getValue() == true &&
|
if ( Ext.getCmp('SendaTestMail').getValue() == true &&
|
||||||
( Ext.getCmp('eMailto').getValue() == '' ||
|
( Ext.getCmp('eMailto').getValue() == '' ||
|
||||||
/^[0-9a-z_\-\.]+@[0-9a-z\-\.]+\.[a-z]{2,4}$/i.test(Ext.getCmp('eMailto').getValue()) != true ) ) {
|
/^[0-9a-z_\-\.]+@[0-9a-z\-\.]+\.[a-z]{2,4}$/i.test(Ext.getCmp('eMailto').getValue()) != true ) ) {
|
||||||
Ext.MessageBox.show({
|
Ext.MessageBox.show({
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
@@ -718,21 +753,21 @@ var testMethod = function()
|
|||||||
params = {
|
params = {
|
||||||
typeTest : 'MAIL',
|
typeTest : 'MAIL',
|
||||||
request : 'mailTestMail_Show',
|
request : 'mailTestMail_Show',
|
||||||
mail_to : 'admin@processmaker.com',
|
mail_to : 'admin@processmaker.com',
|
||||||
send_test_mail : 'yes'
|
send_test_mail : 'yes'
|
||||||
};
|
};
|
||||||
|
|
||||||
Ext.getCmp('step11').setText('<span id="rstep11"></span> '+_('LOGIN_VERIFY_MSG')+' <b> Mail Transport Agent </b>', false);
|
Ext.getCmp('step11').setText('<span id="rstep11"></span> '+_('LOGIN_VERIFY_MSG')+' <b> Mail Transport Agent </b>', false);
|
||||||
Ext.getCmp('step12').setText('<span id="rstep12"></span> '+_('SENDING_TEST_EMAIL')+' [<b>'+ Ext.getCmp('eMailto').getValue() +'</b>]...<b>', false);
|
Ext.getCmp('step12').setText('<span id="rstep12"></span> '+_('SENDING_TEST_EMAIL')+' [<b>'+ Ext.getCmp('eMailto').getValue() +'</b>]...<b>', false);
|
||||||
|
|
||||||
Ext.getCmp('step11').setVisible(false);
|
Ext.getCmp('step11').setVisible(false);
|
||||||
Ext.getCmp('step12').setVisible(false);
|
Ext.getCmp('step12').setVisible(false);
|
||||||
Ext.getCmp('result11').setVisible(false);
|
Ext.getCmp('result11').setVisible(false);
|
||||||
Ext.getCmp('result12').setVisible(false);
|
Ext.getCmp('result12').setVisible(false);
|
||||||
|
|
||||||
Ext.getCmp('doneMail').enable();
|
Ext.getCmp('doneMail').enable();
|
||||||
Ext.getCmp('SaveChanges').disable();
|
Ext.getCmp('SaveChanges').disable();
|
||||||
|
|
||||||
Ext.getCmp('EMailFields').disable();
|
Ext.getCmp('EMailFields').disable();
|
||||||
testEmailWindowMail.show();
|
testEmailWindowMail.show();
|
||||||
Ext.getCmp('EMailFields').enable();
|
Ext.getCmp('EMailFields').enable();
|
||||||
@@ -743,23 +778,23 @@ var testMethod = function()
|
|||||||
if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) {
|
if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) {
|
||||||
Ext.getCmp('Port').setValue('25');
|
Ext.getCmp('Port').setValue('25');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ext.getCmp('RequireAuthentication').checked){
|
if (Ext.getCmp('RequireAuthentication').checked){
|
||||||
if (Ext.getCmp('Password').getValue()=='') {
|
if (Ext.getCmp('Password').getValue()=='') {
|
||||||
if (Ext.getCmp('PasswordHide').getValue()=='') {
|
if (Ext.getCmp('PasswordHide').getValue()=='') {
|
||||||
PMExt.warning(_('ID_WARNING'),_('ID_PASSWD_REQUIRED'));
|
PMExt.warning(_('ID_WARNING'),_('ID_PASSWD_REQUIRED'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var x = Ext.getCmp('UseSecureConnection').getValue();
|
var x = Ext.getCmp('UseSecureConnection').getValue();
|
||||||
var UseSecureConnection = x.getGroupValue();
|
var UseSecureConnection = x.getGroupValue();
|
||||||
var count=0;
|
var count=0;
|
||||||
var create=true;
|
var create=true;
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
typeTest : 'PHPMAILER',
|
typeTest : 'PHPMAILER',
|
||||||
server : Ext.getCmp('Server').getValue(),
|
server : Ext.getCmp('Server').getValue(),
|
||||||
user : Ext.getCmp('AccountFrom').getValue(),
|
user : Ext.getCmp('AccountFrom').getValue(),
|
||||||
passwd : Ext.getCmp('Password').getValue(),
|
passwd : Ext.getCmp('Password').getValue(),
|
||||||
passwdHide : Ext.getCmp('PasswordHide').getValue(),
|
passwdHide : Ext.getCmp('PasswordHide').getValue(),
|
||||||
@@ -768,15 +803,15 @@ var testMethod = function()
|
|||||||
UseSecureCon : UseSecureConnection,
|
UseSecureCon : UseSecureConnection,
|
||||||
SendaTestMail : Ext.getCmp('SendaTestMail').getValue() ,
|
SendaTestMail : Ext.getCmp('SendaTestMail').getValue() ,
|
||||||
eMailto : Ext.getCmp('eMailto').getValue(),
|
eMailto : Ext.getCmp('eMailto').getValue(),
|
||||||
login : Ext.getCmp('AccountFrom').getValue()
|
login : Ext.getCmp('AccountFrom').getValue()
|
||||||
};
|
};
|
||||||
|
|
||||||
Ext.getCmp('step1').setText('<span id="rstep1"></span> '+_('RESOLVING_NAME')+' <b>'+params.server+'</b>', false);
|
Ext.getCmp('step1').setText('<span id="rstep1"></span> '+_('RESOLVING_NAME')+' <b>'+params.server+'</b>', false);
|
||||||
Ext.getCmp('step2').setText('<span id="rstep2"></span> '+_('ID_CHECK_PORT')+' <b>'+params.port+'</b>',false);
|
Ext.getCmp('step2').setText('<span id="rstep2"></span> '+_('ID_CHECK_PORT')+' <b>'+params.port+'</b>',false);
|
||||||
Ext.getCmp('step3').setText('<span id="rstep3"></span> '+_('ESTABLISHING_CON_HOST')+' <b>'+params.server+':'+params.port+'</b>',false);
|
Ext.getCmp('step3').setText('<span id="rstep3"></span> '+_('ESTABLISHING_CON_HOST')+' <b>'+params.server+':'+params.port+'</b>',false);
|
||||||
Ext.getCmp('step4').setText('<span id="rstep4"></span> '+_('LOGIN_AS')+' [<b>'+params.login+'</b>] '+_('ID_ON')+' '+params.server+' '+_('SMTP_SERVER')+' <b>',false);
|
Ext.getCmp('step4').setText('<span id="rstep4"></span> '+_('LOGIN_AS')+' [<b>'+params.login+'</b>] '+_('ID_ON')+' '+params.server+' '+_('SMTP_SERVER')+' <b>',false);
|
||||||
Ext.getCmp('step5').setText('<span id="rstep5"></span> '+_('SENDING_TEST_EMAIL')+' [<b>'+params.eMailto +'</b>]...<b>', false);
|
Ext.getCmp('step5').setText('<span id="rstep5"></span> '+_('SENDING_TEST_EMAIL')+' [<b>'+params.eMailto +'</b>]...<b>', false);
|
||||||
|
|
||||||
Ext.getCmp('step1').setVisible(false);
|
Ext.getCmp('step1').setVisible(false);
|
||||||
Ext.getCmp('step2').setVisible(false);
|
Ext.getCmp('step2').setVisible(false);
|
||||||
Ext.getCmp('step3').setVisible(false);
|
Ext.getCmp('step3').setVisible(false);
|
||||||
@@ -787,10 +822,10 @@ var testMethod = function()
|
|||||||
Ext.getCmp('result3').setVisible(false);
|
Ext.getCmp('result3').setVisible(false);
|
||||||
Ext.getCmp('result4').setVisible(false);
|
Ext.getCmp('result4').setVisible(false);
|
||||||
Ext.getCmp('result5').setVisible(false);
|
Ext.getCmp('result5').setVisible(false);
|
||||||
|
|
||||||
Ext.getCmp('done').enable();
|
Ext.getCmp('done').enable();
|
||||||
Ext.getCmp('SaveChanges').disable();
|
Ext.getCmp('SaveChanges').disable();
|
||||||
|
|
||||||
Ext.getCmp('EMailFields').disable();
|
Ext.getCmp('EMailFields').disable();
|
||||||
testEmailWindow.show();
|
testEmailWindow.show();
|
||||||
Ext.getCmp('EMailFields').enable();
|
Ext.getCmp('EMailFields').enable();
|
||||||
@@ -800,12 +835,12 @@ var testMethod = function()
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
function execTest(step) {
|
function execTest(step) {
|
||||||
|
|
||||||
if (step == 6) return false;
|
if (step == 6) return false;
|
||||||
if (step == 13) return false;
|
if (step == 13) return false;
|
||||||
|
|
||||||
if ((step == 5) && (params.SendaTestMail == false))
|
if ((step == 5) && (params.SendaTestMail == false))
|
||||||
return false;
|
return false;
|
||||||
if ((step == 12) && (Ext.getCmp('SendaTestMail').getValue() != true))
|
if ((step == 12) && (Ext.getCmp('SendaTestMail').getValue() != true))
|
||||||
@@ -813,7 +848,7 @@ function execTest(step) {
|
|||||||
|
|
||||||
document.getElementById('rstep'+step).innerHTML = '<img width="13" height="13" border="0" src="/images/ajax-loader.gif">';
|
document.getElementById('rstep'+step).innerHTML = '<img width="13" height="13" border="0" src="/images/ajax-loader.gif">';
|
||||||
Ext.getCmp('step'+step).setVisible(true);
|
Ext.getCmp('step'+step).setVisible(true);
|
||||||
|
|
||||||
params.step = step;
|
params.step = step;
|
||||||
params.mail_to = (params.step == 12) ? Ext.getCmp('eMailto').getValue() : params.mail_to;
|
params.mail_to = (params.step == 12) ? Ext.getCmp('eMailto').getValue() : params.mail_to;
|
||||||
|
|
||||||
@@ -822,9 +857,9 @@ function execTest(step) {
|
|||||||
method:'POST',
|
method:'POST',
|
||||||
params: params,
|
params: params,
|
||||||
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
||||||
success: function(r,o){
|
success: function(r,o){
|
||||||
var resp = Ext.util.JSON.decode(r.responseText);
|
var resp = Ext.util.JSON.decode(r.responseText);
|
||||||
|
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
img = '/images/dialog-ok-apply.png';
|
img = '/images/dialog-ok-apply.png';
|
||||||
Ext.getCmp('SaveChanges').enable();
|
Ext.getCmp('SaveChanges').enable();
|
||||||
@@ -833,34 +868,34 @@ function execTest(step) {
|
|||||||
img = '/images/delete.png';
|
img = '/images/delete.png';
|
||||||
Ext.getCmp('SaveChanges').disable();
|
Ext.getCmp('SaveChanges').disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('rstep'+step).innerHTML = '<img width="13" height="13" border="0" src="'+img+'">';
|
document.getElementById('rstep'+step).innerHTML = '<img width="13" height="13" border="0" src="'+img+'">';
|
||||||
|
|
||||||
if(resp.msg) {
|
if(resp.msg) {
|
||||||
document.getElementById('result'+step).innerHTML = ' <span style="color:#FF0000;">'+resp.msg+'</span>';
|
document.getElementById('result'+step).innerHTML = ' <span style="color:#FF0000;">'+resp.msg+'</span>';
|
||||||
Ext.getCmp('result'+step).setVisible(true);
|
Ext.getCmp('result'+step).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
execTest(step+1);
|
execTest(step+1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
saveMethod=function() {
|
saveMethod=function() {
|
||||||
var x = Ext.getCmp('UseSecureConnection').getValue();
|
var x = Ext.getCmp('UseSecureConnection').getValue();
|
||||||
var UseSecureConnection = x.getGroupValue();
|
var UseSecureConnection = x.getGroupValue();
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: '../adminProxy/saveConfiguration',
|
url: '../adminProxy/saveConfiguration',
|
||||||
method:'POST',
|
method:'POST',
|
||||||
params:{
|
params:{
|
||||||
type:'type',
|
type:'type',
|
||||||
server:Ext.getCmp('Server').getValue(),
|
server:Ext.getCmp('Server').getValue(),
|
||||||
db_name:'db_name',
|
db_name:'db_name',
|
||||||
from:Ext.getCmp('AccountFrom').getValue(),
|
from:Ext.getCmp('AccountFrom').getValue(),
|
||||||
passwd:Ext.getCmp('Password').getValue(),
|
passwd:Ext.getCmp('Password').getValue(),
|
||||||
passwdHide:Ext.getCmp('PasswordHide').getValue(),
|
passwdHide:Ext.getCmp('PasswordHide').getValue(),
|
||||||
port:Ext.getCmp('Port').getValue(),
|
port:Ext.getCmp('Port').getValue(),
|
||||||
req_auth:Ext.getCmp('RequireAuthentication').getValue(),
|
req_auth:Ext.getCmp('RequireAuthentication').getValue(),
|
||||||
UseSecureCon:UseSecureConnection,
|
UseSecureCon:UseSecureConnection,
|
||||||
SendaTestMail : Ext.getCmp('SendaTestMail').getValue() ,
|
SendaTestMail : Ext.getCmp('SendaTestMail').getValue() ,
|
||||||
eMailto : Ext.getCmp('eMailto').getValue(),
|
eMailto : Ext.getCmp('eMailto').getValue(),
|
||||||
@@ -869,8 +904,8 @@ saveMethod=function() {
|
|||||||
background: 'true'
|
background: 'true'
|
||||||
},
|
},
|
||||||
success: function(r){
|
success: function(r){
|
||||||
var i = Ext.decode(r.responseText);
|
var i = Ext.decode(r.responseText);
|
||||||
PMExt.notify(_('ID_CHANGES_SAVED'),i.msg);
|
PMExt.notify(_('ID_CHANGES_SAVED'),i.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
UnEditMethod();
|
UnEditMethod();
|
||||||
|
|||||||
Reference in New Issue
Block a user