GI-215 Ocultar opcion web application...

- Se quito el combo para seleccionar el tipo de authenticacion.
This commit is contained in:
Marco A. Nina Mena
2015-12-21 08:43:50 -04:00
parent a24732492b
commit e0c3d3fd3a

View File

@@ -19,7 +19,6 @@ Ext.onReady(function(){
}); });
disableAll = function () { disableAll = function () {
Ext.getCmp('typeAuthentication').disable();
Ext.getCmp('email_service_account').disable(); Ext.getCmp('email_service_account').disable();
Ext.getCmp('file_p12').disable(); Ext.getCmp('file_p12').disable();
Ext.getCmp('labelFileP12').disable(); Ext.getCmp('labelFileP12').disable();
@@ -41,12 +40,10 @@ Ext.onReady(function(){
}; };
var enableTypeP12 = function () { var enableTypeP12 = function () {
Ext.getCmp('typeAuthentication').enable();
Ext.getCmp('email_service_account').enable(); Ext.getCmp('email_service_account').enable();
Ext.getCmp('file_p12').enable(); Ext.getCmp('file_p12').enable();
Ext.getCmp('labelFileP12').enable(); Ext.getCmp('labelFileP12').enable();
Ext.getCmp('typeAuthentication').show();
Ext.getCmp('email_service_account').show(); Ext.getCmp('email_service_account').show();
Ext.getCmp('file_p12').show(); Ext.getCmp('file_p12').show();
Ext.getCmp('labelFileP12').show(); Ext.getCmp('labelFileP12').show();
@@ -55,23 +52,16 @@ Ext.onReady(function(){
}; };
var enableTypeJson = function () { var enableTypeJson = function () {
Ext.getCmp('typeAuthentication').enable();
Ext.getCmp('file_json').enable(); Ext.getCmp('file_json').enable();
Ext.getCmp('fileJson').enable(); Ext.getCmp('fileJson').enable();
Ext.getCmp('typeAuthentication').show();
Ext.getCmp('file_json').show(); Ext.getCmp('file_json').show();
Ext.getCmp('fileJson').show(); Ext.getCmp('fileJson').show();
testButton.enable(); testButton.enable();
}; };
changeType = function () { changeType = function () {
var type = Ext.getCmp('typeAuthentication').getValue();
if (type == 'webApplication') {
enableTypeJson();
} else {
enableTypeP12(); enableTypeP12();
}
}; };
var configurationPMGmail = new Ext.form.FieldSet({ var configurationPMGmail = new Ext.form.FieldSet({
@@ -89,9 +79,7 @@ Ext.onReady(function(){
check : function(that, checked) { check : function(that, checked) {
disableAll(); disableAll();
if (checked) { if (checked) {
Ext.getCmp('typeAuthentication').enable(); enableTypeP12();
Ext.getCmp('typeAuthentication').show();
Ext.getCmp('typeAuthentication').clearValue();
} else { } else {
Ext.MessageBox.confirm( Ext.MessageBox.confirm(
_('ID_CONFIRM'), _('ID_CONFIRM'),
@@ -122,11 +110,12 @@ Ext.onReady(function(){
forceSelection: true, forceSelection: true,
store: new Ext.data.SimpleStore({ store: new Ext.data.SimpleStore({
fields: ['value','type'], fields: ['value','type'],
data: [['webApplication','Web Application'],['serviceAccount', 'Service Account']], data: [['webApplication', 'ID_WEB_APPLICATION'],['serviceAccount', 'ID_SERVICE_ACCOUNT']],
autoLoad: true autoLoad: true
}), }),
submitValue : true, submitValue : true,
value: typeAuthentication, value: typeAuthentication,
hidden: true,
valueField: 'value', valueField: 'value',
displayField: 'type', displayField: 'type',
width: 250, width: 250,