BUG 8615 adicion de boton candado para editar email configurations SOLVED
- se añadio un boton para editar la configuracion de correo electronico
This commit is contained in:
@@ -485,17 +485,21 @@ class adminProxy extends HttpProxyController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aFields['MESS_ENABLED'] = isset($_POST['EnableEmailNotifications']) ? $_POST['EnableEmailNotifications'] : '';
|
$aFields['MESS_ENABLED'] = isset($_POST['EnableEmailNotifications']) ? $_POST['EnableEmailNotifications'] : '';
|
||||||
|
$aFields['MESS_ENABLED'] = ($aFields['MESS_ENABLED'] == 'true') ? '1' : $aFields['MESS_ENABLED'];
|
||||||
$aFields['MESS_ENGINE'] = $_POST['EmailEngine'];
|
$aFields['MESS_ENGINE'] = $_POST['EmailEngine'];
|
||||||
$aFields['MESS_SERVER'] = trim($_POST['server']);
|
$aFields['MESS_SERVER'] = trim($_POST['server']);
|
||||||
$aFields['MESS_RAUTH'] = isset($_POST['req_auth']) ? $_POST['req_auth'] : '';
|
$aFields['MESS_RAUTH'] = isset($_POST['req_auth']) ? $_POST['req_auth'] : '';
|
||||||
|
$aFields['MESS_RAUTH'] = ($aFields['MESS_RAUTH'] == 'true') ? '1' : $aFields['MESS_RAUTH'];
|
||||||
$aFields['MESS_PORT'] = $_POST['port'];
|
$aFields['MESS_PORT'] = $_POST['port'];
|
||||||
$aFields['MESS_ACCOUNT'] = $_POST['from'];
|
$aFields['MESS_ACCOUNT'] = $_POST['from'];
|
||||||
$aFields['MESS_BACKGROUND'] = '';//isset($_POST['background']) ? $_POST['background'] : '';
|
$aFields['MESS_BACKGROUND'] = '';//isset($_POST['background']) ? $_POST['background'] : '';
|
||||||
$aFields['MESS_EXECUTE_EVERY'] = '';//$_POST['form']['MESS_EXECUTE_EVERY'];
|
$aFields['MESS_EXECUTE_EVERY'] = '';//$_POST['form']['MESS_EXECUTE_EVERY'];
|
||||||
$aFields['MESS_SEND_MAX'] = '';//$_POST['form']['MESS_SEND_MAX'];
|
$aFields['MESS_SEND_MAX'] = '';//$_POST['form']['MESS_SEND_MAX'];
|
||||||
$aFields['SMTPSecure'] = $_POST['UseSecureCon'];
|
$aFields['SMTPSecure'] = $_POST['UseSecureCon'];
|
||||||
|
$aFields['SMTPSecure'] = ($aFields['SMTPSecure'] == 'No') ? 'none' : $aFields['SMTPSecure'];
|
||||||
$aFields['MAIL_TO'] = $_POST['eMailto'];
|
$aFields['MAIL_TO'] = $_POST['eMailto'];
|
||||||
$aFields['MESS_TRY_SEND_INMEDIATLY'] = $_POST['SendaTestMail'];//isset($_POST['form']['MESS_TRY_SEND_INMEDIATLY']) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '';
|
$aFields['MESS_TRY_SEND_INMEDIATLY'] = $_POST['SendaTestMail'];//isset($_POST['form']['MESS_TRY_SEND_INMEDIATLY']) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '';
|
||||||
|
$aFields['MESS_TRY_SEND_INMEDIATLY'] = ($aFields['MESS_TRY_SEND_INMEDIATLY'] == 'true') ? '1' : $aFields['MESS_TRY_SEND_INMEDIATLY'];
|
||||||
$CfgUid='Emails';
|
$CfgUid='Emails';
|
||||||
$ObjUid='';
|
$ObjUid='';
|
||||||
$ProUid='';
|
$ProUid='';
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Ext.onReady(function(){
|
|||||||
name: 'EnableEmailNotifications',
|
name: 'EnableEmailNotifications',
|
||||||
id: 'EnableEmailNotifications',
|
id: 'EnableEmailNotifications',
|
||||||
checked:false,
|
checked:false,
|
||||||
|
disabled : true,
|
||||||
listeners: {
|
listeners: {
|
||||||
check: function(EnableEmailNotifications, checked) {
|
check: function(EnableEmailNotifications, checked) {
|
||||||
if(checked) {
|
if(checked) {
|
||||||
@@ -39,7 +40,6 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
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('Test').setDisabled(false);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
combo.setVisible(false);
|
combo.setVisible(false);
|
||||||
@@ -57,7 +57,7 @@ Ext.onReady(function(){
|
|||||||
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('');
|
||||||
@@ -70,7 +70,6 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
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').setDisabled(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,6 +89,7 @@ Ext.onReady(function(){
|
|||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
fieldLabel: _('EMAIL_ENGINE'),//'Email Engine',
|
fieldLabel: _('EMAIL_ENGINE'),//'Email Engine',
|
||||||
blankText: '',
|
blankText: '',
|
||||||
|
valueField: 'id',
|
||||||
lazyRender: true,
|
lazyRender: true,
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
selectOnFocus: true,
|
selectOnFocus: true,
|
||||||
@@ -98,6 +98,7 @@ Ext.onReady(function(){
|
|||||||
displayField:'EmailEngine',
|
displayField:'EmailEngine',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
|
disabled : true,
|
||||||
listeners: {
|
listeners: {
|
||||||
select: function(combo, value) {
|
select: function(combo, value) {
|
||||||
if (Ext.getCmp('EmailEngine').getValue()== 'Mail (PHP)') {
|
if (Ext.getCmp('EmailEngine').getValue()== 'Mail (PHP)') {
|
||||||
@@ -127,7 +128,48 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var tb = new Ext.Toolbar({
|
||||||
|
style : 'background: #EEEEEE;',
|
||||||
|
items: [{
|
||||||
|
xtype:'button',
|
||||||
|
id:'UnEdit',
|
||||||
|
iconCls: 'button_menu_ext',
|
||||||
|
icon: '/images/unlocked.png',
|
||||||
|
handler: UnEditMethod
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype:'button',
|
||||||
|
id:'Edit',
|
||||||
|
iconCls: 'button_menu_ext',
|
||||||
|
icon: '/images/locked.png',
|
||||||
|
handler: EditMethod
|
||||||
|
},' ',
|
||||||
|
{
|
||||||
|
xtype:'label',
|
||||||
|
text:_('ID_CLICK_LOCK'),
|
||||||
|
id:'label'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype:'label',
|
||||||
|
text:_('ID_CLICK_UNLOCK'),
|
||||||
|
id:'labelUn'
|
||||||
|
},
|
||||||
|
'->',
|
||||||
|
{
|
||||||
|
text : _('ID_TEST'),
|
||||||
|
width: 55,
|
||||||
|
id:'Test',
|
||||||
|
handler: testMethod
|
||||||
|
},' ',
|
||||||
|
{
|
||||||
|
text : _('ID_SAVE_CHANGES'),
|
||||||
|
id:'SaveChanges',
|
||||||
|
width: 85,
|
||||||
|
disabled : true,
|
||||||
|
handler: saveMethod
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
var EMailFields = new Ext.form.FieldSet({
|
var EMailFields = new Ext.form.FieldSet({
|
||||||
title: _('ID_CONFIGURATION'),
|
title: _('ID_CONFIGURATION'),
|
||||||
items : [
|
items : [
|
||||||
@@ -141,6 +183,7 @@ Ext.onReady(function(){
|
|||||||
//blankText: 'Server',
|
//blankText: 'Server',
|
||||||
width: 200,
|
width: 200,
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
|
disabled : true,
|
||||||
listeners : {
|
listeners : {
|
||||||
'change': {
|
'change': {
|
||||||
fn:function() {
|
fn:function() {
|
||||||
@@ -158,6 +201,7 @@ Ext.onReady(function(){
|
|||||||
emptyText : null,
|
emptyText : null,
|
||||||
width: 40,
|
width: 40,
|
||||||
maxLength: 3,
|
maxLength: 3,
|
||||||
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -167,6 +211,7 @@ Ext.onReady(function(){
|
|||||||
name:'RequireAuthentication',
|
name:'RequireAuthentication',
|
||||||
validateMessage: 'You really should do it.',
|
validateMessage: 'You really should do it.',
|
||||||
validateField: true,
|
validateField: true,
|
||||||
|
disabled : true,
|
||||||
handler: function() {
|
handler: function() {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
Ext.getCmp('Password').setVisible(true);
|
Ext.getCmp('Password').setVisible(true);
|
||||||
@@ -186,6 +231,7 @@ Ext.onReady(function(){
|
|||||||
name:'AccountFrom',
|
name:'AccountFrom',
|
||||||
vtype:'email',
|
vtype:'email',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -197,6 +243,7 @@ Ext.onReady(function(){
|
|||||||
width: 200,
|
width: 200,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
|
disabled : true,
|
||||||
allowBlank: true
|
allowBlank: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -207,6 +254,7 @@ Ext.onReady(function(){
|
|||||||
inputType: 'password',
|
inputType: 'password',
|
||||||
width: 200,
|
width: 200,
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
|
disabled : true,
|
||||||
listeners : {
|
listeners : {
|
||||||
'change' : function() {
|
'change' : function() {
|
||||||
if (Ext.getCmp('Password').getValue() != '') {
|
if (Ext.getCmp('Password').getValue() != '') {
|
||||||
@@ -220,6 +268,7 @@ Ext.onReady(function(){
|
|||||||
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,
|
||||||
listeners: {
|
listeners: {
|
||||||
check: function(EnableEmailNotifications, checked) {
|
check: function(EnableEmailNotifications, checked) {
|
||||||
if(checked) {
|
if(checked) {
|
||||||
@@ -241,6 +290,7 @@ Ext.onReady(function(){
|
|||||||
id:'eMailto',
|
id:'eMailto',
|
||||||
name:'eMailto',
|
name:'eMailto',
|
||||||
width: 200,
|
width: 200,
|
||||||
|
disabled : true,
|
||||||
allowBlank: false
|
allowBlank: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -250,17 +300,17 @@ Ext.onReady(function(){
|
|||||||
fieldLabel: _('USE_SECURE_CONNECTION'),//'Use Secure Connection',
|
fieldLabel: _('USE_SECURE_CONNECTION'),//'Use Secure Connection',
|
||||||
columns: 3,
|
columns: 3,
|
||||||
width: 200,
|
width: 200,
|
||||||
|
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'},
|
||||||
{boxLabel: 'SSL', inputValue: 'ssl',name: 'UseSecureConnection'}
|
{boxLabel: 'SSL', inputValue: 'ssl',name: 'UseSecureConnection'}
|
||||||
]
|
]
|
||||||
}
|
},tb
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
loadfields = function(){
|
loadfields = function(){
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: '../adminProxy/loadFields',
|
url: '../adminProxy/loadFields',
|
||||||
@@ -306,7 +356,7 @@ Ext.onReady(function(){
|
|||||||
width:600,
|
width:600,
|
||||||
labelAlign:'right',
|
labelAlign:'right',
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
bodyStyle:'padding:2px',
|
// bodyStyle:'padding:2px',
|
||||||
waitMsgTarget : true,
|
waitMsgTarget : true,
|
||||||
frame: true,
|
frame: true,
|
||||||
defaults: {
|
defaults: {
|
||||||
@@ -314,18 +364,7 @@ Ext.onReady(function(){
|
|||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items: [ EMailFields ],
|
items: [EMailFields ]
|
||||||
buttons : [{
|
|
||||||
text : _('ID_TEST'),
|
|
||||||
id:'Test',
|
|
||||||
handler: testMethod
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text : _('ID_SAVE_CHANGES'),
|
|
||||||
id:'SaveChanges',
|
|
||||||
disabled : true,
|
|
||||||
handler: saveMethod
|
|
||||||
}]
|
|
||||||
});
|
});
|
||||||
//render to process-panel
|
//render to process-panel
|
||||||
frm.render(document.body);
|
frm.render(document.body);
|
||||||
@@ -347,7 +386,10 @@ Ext.onReady(function(){
|
|||||||
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').setDisabled(true);
|
Ext.getCmp('Test').setVisible(false);
|
||||||
|
Ext.getCmp('SaveChanges').setVisible(false);
|
||||||
|
Ext.getCmp('UnEdit').setVisible(false);
|
||||||
|
Ext.getCmp('labelUn').setVisible(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
var testConnForm = new Ext.FormPanel({
|
var testConnForm = new Ext.FormPanel({
|
||||||
@@ -462,6 +504,45 @@ var testEmailWindow = new Ext.Window({
|
|||||||
|
|
||||||
var params;
|
var params;
|
||||||
var count = 0;
|
var count = 0;
|
||||||
|
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('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);
|
||||||
|
}
|
||||||
|
|
||||||
|
var UnEditMethod = function()
|
||||||
|
{
|
||||||
|
Ext.getCmp('EnableEmailNotifications').setDisabled(true);
|
||||||
|
Ext.getCmp('EmailEngine').setDisabled(true);
|
||||||
|
Ext.getCmp('Server').setDisabled(true);
|
||||||
|
Ext.getCmp('Port').setDisabled(true);
|
||||||
|
Ext.getCmp('RequireAuthentication').setDisabled(true);
|
||||||
|
Ext.getCmp('AccountFrom').setDisabled(true);
|
||||||
|
Ext.getCmp('Password').setDisabled(true);
|
||||||
|
Ext.getCmp('SendaTestMail').setDisabled(true);
|
||||||
|
Ext.getCmp('eMailto').setDisabled(true);
|
||||||
|
Ext.getCmp('UseSecureConnection').setDisabled(true);
|
||||||
|
Ext.getCmp('Test').setVisible(false);
|
||||||
|
Ext.getCmp('SaveChanges').setVisible(false);
|
||||||
|
Ext.getCmp('UnEdit').setVisible(false);
|
||||||
|
Ext.getCmp('Edit').setVisible(true);
|
||||||
|
Ext.getCmp('label').setVisible(true);
|
||||||
|
Ext.getCmp('labelUn').setVisible(false);
|
||||||
|
}
|
||||||
var testMethod = function()
|
var testMethod = function()
|
||||||
{
|
{
|
||||||
if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) {
|
if((Ext.getCmp('Port').getValue()==null)||(Ext.getCmp('Port').getValue()=='')) {
|
||||||
@@ -589,4 +670,5 @@ saveMethod=function() {
|
|||||||
PMExt.notify(_('ID_CHANGES_SAVED'),i.msg);
|
PMExt.notify(_('ID_CHANGES_SAVED'),i.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
UnEditMethod();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user