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