From 4de1190e026f1c21f887565457d5835cb0c1061c Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Thu, 18 Sep 2025 14:30:02 +0000 Subject: [PATCH] TASK-230 Delete ldap directories xmlform and templates --- .../authSources/authSources_SearchUsers.php | 37 +- .../authSourcesSearchUsers.js} | 0 .../authSourcesSearchUsersLibrary.js} | 0 .../ldapAdvanced/ldapAdvancedForm.js | 237 --------- .../ldapAdvanced/ldapAdvancedList.js | 487 ------------------ .../templates/ldapAdvanced/searchSummary.js | 180 ------- .../xmlform/ldapAdvanced/gridAttribute.xml | 11 - .../xmlform/ldapAdvanced/ldapAdvanced.xml | 11 - .../xmlform/ldapAdvanced/ldapAdvancedEdit.xml | 215 -------- .../xmlform/ldapAdvanced/ldapAdvancedFlag | 1 - 10 files changed, 12 insertions(+), 1167 deletions(-) rename workflow/engine/templates/{ldapAdvanced/ldapAdvancedSearch.js => authSources/authSourcesSearchUsers.js} (100%) rename workflow/engine/templates/{ldapAdvanced/library.js => authSources/authSourcesSearchUsersLibrary.js} (100%) delete mode 100644 workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js delete mode 100644 workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js delete mode 100644 workflow/engine/templates/ldapAdvanced/searchSummary.js delete mode 100644 workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml delete mode 100644 workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml delete mode 100644 workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml delete mode 100644 workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag diff --git a/workflow/engine/methods/authSources/authSources_SearchUsers.php b/workflow/engine/methods/authSources/authSources_SearchUsers.php index 39fa23bd2..d909f8bf5 100644 --- a/workflow/engine/methods/authSources/authSources_SearchUsers.php +++ b/workflow/engine/methods/authSources/authSources_SearchUsers.php @@ -33,34 +33,21 @@ $G_SUB_MENU = 'users'; $G_ID_MENU_SELECTED = 'USERS'; $G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES'; + $G_PUBLISH = new Publisher(); $fields = $RBAC->getAuthSource($_GET['sUID']); -if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) { - $pluginEnabled = 1; - if ($pluginEnabled == 0) { - $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => G::LoadTranslation('ID_AUTH_SOURCE_FEATURE_MISSING') )); - G::RenderPage('publish', 'blank'); - } else { - $c = new Configurations(); - $configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']); - $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; - $oHeadPublisher = headPublisher::getSingleton(); +$c = new Configurations(); +$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']); +$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; - $oHeadPublisher->assign("FORMATS", $c->getFormats()); - $oHeadPublisher->assign("CONFIG", $Config); +$oHeadPublisher = headPublisher::getSingleton(); +$oHeadPublisher->assign("FORMATS", $c->getFormats()); +$oHeadPublisher->assign("CONFIG", $Config); +$oHeadPublisher->assign("Fields", $fields); - if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) { - $oHeadPublisher = headPublisher::getSingleton(); +$oHeadPublisher->addExtJsScript(PATH_TPL. 'authSources/authSourcesSearchUsersLibrary', false, true); +$oHeadPublisher->addExtJsScript(PATH_TPL. 'authSources/authSourcesSearchUsers', false, true); - $oHeadPublisher->assign("Fields", $fields); - $oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/library', false, true); - $oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedSearch', false, true); - G::RenderPage('publish', 'extJs'); - die(); - } - } -} - -$G_PUBLISH->AddContent('xmlform', 'xmlform', 'authSources/authSources_SearchUsers', '', array('AUTH_SOURCE_UID' => $_GET['sUID']), '../authSources/authSources_ImportUsers'); -G::RenderPage('publish', 'blank'); +G::RenderPage('publish', 'extJs'); +die(); diff --git a/workflow/engine/templates/ldapAdvanced/ldapAdvancedSearch.js b/workflow/engine/templates/authSources/authSourcesSearchUsers.js similarity index 100% rename from workflow/engine/templates/ldapAdvanced/ldapAdvancedSearch.js rename to workflow/engine/templates/authSources/authSourcesSearchUsers.js diff --git a/workflow/engine/templates/ldapAdvanced/library.js b/workflow/engine/templates/authSources/authSourcesSearchUsersLibrary.js similarity index 100% rename from workflow/engine/templates/ldapAdvanced/library.js rename to workflow/engine/templates/authSources/authSourcesSearchUsersLibrary.js diff --git a/workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js b/workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js deleted file mode 100644 index f58ffd371..000000000 --- a/workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js +++ /dev/null @@ -1,237 +0,0 @@ -var ldapFormAnonymousOnChange = function (combo, arrayObject) -{ - var flagAnonymous = (combo.getValue() == "1")? true : false; - - arrayObject["ldapFormSearchUser"].allowBlank = flagAnonymous; - arrayObject["ldapFormPassword"].allowBlank = flagAnonymous; - - arrayObject["ldapFormSearchUser"].setVisible(!flagAnonymous); - arrayObject["ldapFormPassword"].setVisible(!flagAnonymous); -}; - -var ldapFormId = new Ext.form.Hidden({ - name: 'AUTH_SOURCE_UID', - id: 'AUTH_SOURCE_UID' -}); - -var ldapFormName = new Ext.form.TextField({ - fieldLabel: '*' + _('ID_NAME'), - name: 'AUTH_SOURCE_NAME', - id: 'AUTH_SOURCE_NAME', - autoCreate: {tag: 'input', type: 'text', maxlength: '50'}, - allowBlank: false, - width: 210 -}); - -var ldapFormProvider = new Ext.form.Hidden({ - name: 'AUTH_SOURCE_PROVIDER', - id: 'AUTH_SOURCE_PROVIDER' -}); - -var ldapFormType = new Ext.form.ComboBox({ - valueField: 'ID', - displayField: 'VALUE', - value: 'ldap', - - fieldLabel: '*' + _('ID_TYPE'), - typeAhead: true, - forceSelection: true, - triggerAction: 'all', - editable: true, - name: 'LDAP_TYPE', - id: 'LDAP_TYPE', - width: 130, - allowBlank: false, - store: [["ldap", "OpenLDAP"], ["ad", "Active Directory"], ["ds", "389 DS"]], - listeners:{ - select: function(combo, record) { - ldapFormIdentifier.setValue((combo.getValue() == "ad")? "samaccountname" : "uid"); - } - } -}); - -var ldapFormAutoRegister = new Ext.form.ComboBox({ - valueField: 'ID', - displayField: 'VALUE', - value: '0', - - fieldLabel: '*' + _("ID_ENABLE_AUTOMATIC_REGISTER"), - typeAhead: true, - forceSelection: true, - triggerAction: 'all', - editable: true, - name: 'AUTH_SOURCE_AUTO_REGISTER', - id: 'AUTH_SOURCE_AUTO_REGISTER', - width: 130, - allowBlank: false, - store: [['0',_('ID_NO')],['1',_('ID_YES')]] -}); - -var ldapFormServerName = new Ext.form.TextField({ - fieldLabel: '*' + _("ID_SERVER_ADDRESS"), - name: 'AUTH_SOURCE_SERVER_NAME', - id: 'AUTH_SOURCE_SERVER_NAME', - autoCreate: {tag: 'input', type: 'text', maxlength: '50'}, - allowBlank: false, - width: 210 -}); - -var ldapFormPort = new Ext.form.NumberField({ - fieldLabel: '*' + _('ID_PORT'), - name: 'AUTH_SOURCE_PORT', - id: 'AUTH_SOURCE_PORT', - allowBlank: true, - width: 130, - value: '389', - autoCreate: {tag: 'input', type: 'text', maxlength: '5'} -}); - -var ldapFormTls = new Ext.form.ComboBox({ - valueField: 'ID', - displayField: 'VALUE', - - fieldLabel: '*' + _('ID_ENABLED_TLS'), - typeAhead: true, - forceSelection: true, - triggerAction: 'all', - editable: true, - name: 'AUTH_SOURCE_ENABLED_TLS', - id: 'AUTH_SOURCE_ENABLED_TLS', - width: 130, - allowBlank: false, - value: '0', - store: [['0',_('ID_NO')],['1',_('ID_YES')]] -}); - -var ldapFormBaseDN = new Ext.form.TextField({ - fieldLabel: '*' + _('ID_BASE_DN'), - name: 'AUTH_SOURCE_BASE_DN', - id: 'AUTH_SOURCE_BASE_DN', - autoCreate: {tag: 'input', type: 'text', maxlength: '128'}, - allowBlank: false, - width: 210 -}); - -var ldapFormAnonymous = new Ext.form.ComboBox({ - valueField: 'ID', - displayField: 'VALUE', - - fieldLabel: '*' + _('ID_ANONYMOUS'), - typeAhead: true, - forceSelection: true, - triggerAction: 'all', - editable: true, - name: 'AUTH_ANONYMOUS', - id: 'AUTH_ANONYMOUS', - width: 130, - allowBlank: false, - value: '0', - store: [['0',_('ID_NO')],['1',_('ID_YES')]], - listeners:{ - select: function(combo, record) { - var arrayObject = []; - arrayObject["ldapFormSearchUser"] = ldapFormSearchUser; - arrayObject["ldapFormPassword"] = ldapFormPassword; - - ldapFormAnonymousOnChange(combo, arrayObject); - } - } -}); - -var ldapFormSearchUser = new Ext.form.TextField({ - fieldLabel: '*' + _('ID_USERNAME'), - name: 'AUTH_SOURCE_SEARCH_USER', - id: 'AUTH_SOURCE_SEARCH_USER', - autoCreate: {tag: 'input', type: 'text', maxlength: '128'}, - allowBlank: false, - width: 210 -}); - -var ldapFormPassword = new Ext.form.TextField({ - fieldLabel: '*' + _('ID_PASSWORD'), - inputType: 'password', - name: 'AUTH_SOURCE_PASSWORD', - id: 'AUTH_SOURCE_PASSWORD', - autoCreate: {tag: 'input', type: 'text', maxlength: '32'}, - allowBlank: false, - width: 210 -}); - -var ldapFormIdentifier = new Ext.form.TextField({ - fieldLabel: '*' + _("ID_USER_IDENTIFIER"), - name: 'AUTH_SOURCE_IDENTIFIER_FOR_USER', - id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER', - autoCreate: {tag: 'input', type: 'text', maxlength: '20'}, - allowBlank: false, - width: 210, - value: 'uid' -}); - -var ldapFormUsersFilter = new Ext.form.TextField({ - fieldLabel: _("ID_FILTER_TO_SEARCH_USERS"), - name: 'AUTH_SOURCE_USERS_FILTER', - id: 'AUTH_SOURCE_USERS_FILTER', - autoCreate: {tag: 'input', type: 'text', maxlength: '200'}, - allowBlank: true, - width: 210 -}); - -var ldapFormRetiredEmployees = new Ext.form.TextField({ - fieldLabel: _("ID_OU_FOR_RETIRED_EMPLOYEES_OU"), - name: 'AUTH_SOURCE_RETIRED_OU', - id: 'AUTH_SOURCE_RETIRED_OU', - autoCreate: {tag: 'input', type: 'text', maxlength: '128'}, - allowBlank: true, - width: 210 -}); - -var ldapFormAttrinuteIds = new Ext.form.Hidden({ - name: 'AUTH_SOURCE_ATTRIBUTE_IDS', - id: 'AUTH_SOURCE_ATTRIBUTE_IDS' -}); - -var ldapFormShowGrid = new Ext.form.Hidden({ - name: 'AUTH_SOURCE_SHOWGRID', - id: 'AUTH_SOURCE_SHOWGRID' -}); - -var ldapFormGridText = new Ext.form.Hidden({ - name: 'AUTH_SOURCE_GRID_TEXT', - id: 'AUTH_SOURCE_GRID_TEXT' -}); - - -/////////////////////////////////////////////////////////////////////////////////////// - -var ldapFormData = new Ext.form.FieldSet({ - style: { - border: "0px" - }, - - labelWidth : 170, - items :[ - ldapFormId, ldapFormName, ldapFormProvider, ldapFormType, ldapFormAutoRegister, ldapFormServerName, - ldapFormPort, ldapFormTls, ldapFormBaseDN, ldapFormAnonymous, ldapFormSearchUser, ldapFormPassword, - ldapFormIdentifier, ldapFormUsersFilter, ldapFormRetiredEmployees, - { - xtype: 'label', - fieldLabel: ' ', - id:'passwordReview', - width: 300, - style: 'font: 9px tahoma,arial,helvetica,sans-serif;', - text: _("ID_DEFAULT_SET_TO"), - labelSeparator: '' - }, ldapFormAttrinuteIds, ldapFormShowGrid, ldapFormGridText - ] -}); - -var pnlData = new Ext.Panel({ - height: 425, - - bodyStyle: "border-top: 0px; padding-top: 10px;", - - title: "
" + _("ID_INFORMATION") + "
", - - items: [ldapFormData] -}); - diff --git a/workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js b/workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js deleted file mode 100644 index f82be94b8..000000000 --- a/workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js +++ /dev/null @@ -1,487 +0,0 @@ -Ext.onReady(function() { - //Head - Add style - var nhead = document.getElementsByTagName("head")[0]; - var nstyle = document.createElement("style"); - var strCss = "\ - .ext-mb-ok {\ - background: transparent url(/images/dialog-ok-apply.png) no-repeat top left;\ - }"; - - nstyle.setAttribute("type", "text/css"); - - nhead.appendChild(nstyle); - - if (nstyle.styleSheet) { - //IE - nstyle.styleSheet.cssText = strCss; - } else { - //Others browsers - nstyle.appendChild(document.createTextNode(strCss)); - } - - //Init - Ext.QuickTips.init(); - Ext.form.Field.prototype.msgTarget = 'side'; - - var ldapGridProxy = new Ext.data.HttpProxy({ - method: 'POST', - api: { - read : 'ldapAdvancedProxy.php?functionAccion=ldapGrid&tipo=read', - create : 'ldapAdvancedProxy.php?functionAccion=ldapGrid&tipo=create', - save : 'ldapAdvancedProxy.php?functionAccion=ldapGrid&tipo=save', - destroy : 'ldapAdvancedProxy.php?functionAccion=ldapGrid&tipo=destroy', - update : 'ldapAdvancedProxy.php?functionAccion=ldapGrid&tipo=update' - } - }); - - var ldapGridReader = new Ext.data.JsonReader({ - totalProperty: 'total', - successProperty: 'success', - messageProperty: 'message', - idProperty: 'ID', - root: 'data', - fields: [ - {name: 'ID'}, - {name: 'ATTRIBUTE_LDAP'}, - {name: 'ATTRIBUTE_USER'} - ] - }); - - var ldapGridWriter = new Ext.data.JsonWriter({ - encode: true, - writeAllFields: true, - listful: true - }); - - var ldapGridStore = new Ext.data.Store({ - proxy: ldapGridProxy, - reader: ldapGridReader, - writer: ldapGridWriter, - autoSave: true, - listeners:{ - load: function() { - // - } - } - }); - - - - Ext.data.DataProxy.addListener('beforewrite', function(proxy, action) { - /* - if(action != 'create') - { - Ext.MessageBox.show({ - msg: 'Guardando su información, espere un momento por favor', - progressText: 'Saving...', - width:300, - wait:true, - waitConfig: {interval:200}, - animEl: 'mb7' - }); - } - */ - }); - - Ext.data.DataProxy.addListener('write', function(proxy, action, result, res, rs) { - // - }); - - Ext.data.DataProxy.addListener('exception', function(proxy, type, action, options, res) { - /* - Ext.MessageBox.show({ - title: 'Error de almacenamiento', - msg: 'Error al almacenar datos', - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.ERROR - }); - */ - }); - - var ldapGridFieldLdap = new Ext.form.TextField({ - name: 'DELETE1', - id: 'DELETE1', - autoCreate: {tag: 'input', type: 'text', maxlength: '50'} - }); - - var values = Fields.AUTH_SOURCE_ATTRIBUTE_IDS; - values = values.trim(); - var allValues = new Array(); - var comboValues = new Array(); - allValues = values.split('|'); - for (var i = 0; i < allValues.length; i++) { - if (allValues[i] != '') { - comboValues.push([allValues[i],allValues[i]]); - } - } - - var ldapGridFieldUser = new Ext.form.ComboBox({ - valueField: 'ID', - displayField: 'VALUE', - value: '0', - - typeAhead: true, - forceSelection: true, - triggerAction: 'all', - name: 'DELETE2', - id: 'DELETE2', - editable: true, - width: 130, - store: comboValues - }); - - var ldapGridCol = [ - { - id: 'ID', - dataIndex: 'ID', - sortable: true, - hidden: true, - hideable:false - },{ - id: 'ATTRIBUTE_LDAP', - header: _("ID_LDAP_FIELD"), - dataIndex: 'ATTRIBUTE_LDAP', - width: 10, - sortable: true, - editor: ldapGridFieldLdap - }, - { - id: 'ATTRIBUTE_USER', - header: _("ID_USER_FIELD"), - dataIndex: 'ATTRIBUTE_USER', - width: 10, - sortable: true, - editor: ldapGridFieldUser - } - ]; - - var ldapGridEditor = new Ext.ux.grid.RowEditor({ - saveText: _('ID_SAVE'), - cancelText: _('ID_CANCEL'), - listeners: { - canceledit: function(grid,obj){ - // - }, - afteredit: function(grid,obj,record){ - // - } - } - }); - - var ldapGrid = new Ext.grid.GridPanel({ - store: ldapGridStore, - loadMask : true, - plugins: [ldapGridEditor], - frame: true, - height: 365, - columns : ldapGridCol, - autoShow: true, - autoFill:true, - nocache: true, - autoWidth: true, - stripeRows: true, - stateful: true, - animCollapse: true, - enableColumnResize: true, - enableHdMenu: true, - columnLines: true, - - tbar: [{ - text: _('ID_ADD'), - iconCls: ' x-btn-text button_menu_ext ss_sprite ss_add', - handler: onAdd - }, '-', { - text: _('ID_REMOVE'), - iconCls: ' x-btn-text button_menu_ext ss_sprite ss_delete', - handler: onDelete - }], - viewConfig: { - forceFit: true - } - }); - - function onAdd(btn, ev) { - var row = new ldapGrid.store.recordType({ - ID: 'NUEVO', - ATTRIBUTE_LDAP: '', - ATTRIBUTE_USER: '' - }); - - var length = ldapGrid.getStore().data.length; - ldapGridEditor.stopEditing(); - ldapGridStore.insert(length, row); - ldapGrid.getView().refresh(); - ldapGrid.getSelectionModel().selectRow(length); - ldapGridEditor.startEditing(length); - } - - function onDelete() { - var rec = ldapGrid.getSelectionModel().getSelected(); - if (!rec) { - return false; - } - ldapGrid.store.remove(rec); - } - - /////////////////////////////////////////////////////////////////////////////////////// - - var pnlAttribute = new Ext.Panel({ - height: 425, - bodyStyle: "border-top: 0px; padding: 10px;", - - title: "
", - items: [ldapGrid], - - listeners: { - afterrender: function (panel) - { - var chk = new Ext.form.Checkbox({ - id: "AUTH_SOURCE_SHOWGRID-checkbox", - name: "AUTH_SOURCE_SHOWGRID-checkbox", - boxLabel: _("ID_MATCH_ATTRIBUTES_TO_SYNC"), - renderTo: "containerChkAttribute", - - listeners: { - check: function (chk, checked) - { - ldapGrid.setVisible(checked); - } - } - }); - } - } - }); - - /////////////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////////////// - - var ldapFormSubmit = function () - { - var itemsLdapGrid = ldapGrid.store.data.items; - var arrayDetail = []; - - for (var i = 0; i <= itemsLdapGrid.length - 1; i++) { - var newItem = { - attributeLdap: itemsLdapGrid[i].data.ATTRIBUTE_LDAP, - attributeUser: itemsLdapGrid[i].data.ATTRIBUTE_USER - }; - - arrayDetail[i] = newItem; - } - - Ext.get("LDAP_TYPE").dom.value = ldapFormType.getValue(); - Ext.get("AUTH_SOURCE_AUTO_REGISTER").dom.value = ldapFormAutoRegister.getValue(); - Ext.get("AUTH_SOURCE_ENABLED_TLS").dom.value = ldapFormTls.getValue(); - Ext.get("AUTH_ANONYMOUS").dom.value = ldapFormAnonymous.getValue(); - Ext.get("AUTH_SOURCE_GRID_TEXT").dom.value = Ext.util.JSON.encode(arrayDetail); - - ldapForm.getForm().submit({ - method: "POST", - waitTitle: _('ID_CONNECTING'), - waitMsg: _("ID_SAVING"), - success: function (form, action) - { - redirectPage("../authSources/authSources_List?" + randomNum(1, 9999999)); - }, - failure: function (form, action) - { - // - } - }); - }; - - var ldapForm = new Ext.FormPanel({ - url : 'ldapAdvancedProxy.php?functionAccion=ldapSave', - frame : true, - title : _("ID_AUTHENTICATION_SOURCE_INFORMATION"), - border : false, - autoScroll: true, - monitorValid : true, - - items:[ - { - layout:'column', - autoScroll:true, - - bodyStyle: "border: 0px;", - - items:[{ - columnWidth: 0.5, - bodyStyle: "border: 0px;", - items: [pnlData] - },{ - columnWidth: 0.5, - bodyStyle: "border: 0px; padding-left: 10px;", - items: [pnlAttribute] - }] - }, - { - layout: "column", - autoScroll: true, - - bodyStyle: "margin-top: 0.5em; border: 0px;", - - items: [ - { - columnWidth: 1, - bodyStyle: "border: 0px;", - html: _("ID_MINIMUM_DATA_REQUIRED_TO_RUN_THE") - } - ] - } - ], - buttons: [ - { - text: _("ID_SAVE"), - formBind: true, - handler: function () - { - if (typeof(Fields.AUTH_SOURCE_UID) != "undefined" && typeof(Fields.AUTH_SOURCE_BASE_DN) != "undefined" && ldapFormBaseDN.getValue() != Fields.AUTH_SOURCE_BASE_DN) { - Ext.Ajax.request({ - url: "ldapAdvancedProxy.php", - method: "POST", - params: { - functionAccion: "ldapVerifyIfExistsRecordsInDb", - authenticationSourceUid: Fields.AUTH_SOURCE_UID - }, - - success: function (response, opts) - { - var dataResponse = Ext.util.JSON.decode(response.responseText); - - if (dataResponse.status) { - if (dataResponse.status == "OK" && dataResponse.existsRecords + "" == "1") { - Ext.MessageBox.confirm( - _("ID_CONFIRM"), - "System has detected that there are synchronized elements with the \"Authentication Source \" you are editing, if you change the \"Base DN\" those synchronized elements could have problems. Are you sure you want to change the \"Base DN\"?", - function (btn) - { - if (btn == "yes") { - ldapFormSubmit(); - } - } - ); - } else { - ldapFormSubmit(); - } - } else { - ldapFormSubmit(); - } - }, - failure: function (response, opts) - { - // - } - }); - } else { - ldapFormSubmit(); - } - } - }, - { - text: _('ID_TEST_CONNECTION'), - formBind: true, - handler: function () - { - var loadMaskAux = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_TESTING_CONNECTION')}); - loadMaskAux.show(); - - Ext.Ajax.request({ - url: "ldapAdvancedProxy.php", - method: "POST", - params: { - functionAccion: "ldapTestConnection", - AUTH_SOURCE_SERVER_NAME: Ext.getCmp("AUTH_SOURCE_SERVER_NAME").getValue(), - AUTH_SOURCE_PORT: Ext.getCmp("AUTH_SOURCE_PORT").getValue(), - AUTH_SOURCE_ENABLED_TLS: Ext.getCmp("AUTH_SOURCE_ENABLED_TLS").getValue(), - AUTH_ANONYMOUS: Ext.getCmp("AUTH_ANONYMOUS").getValue(), - AUTH_SOURCE_SEARCH_USER: Ext.getCmp("AUTH_SOURCE_SEARCH_USER").getValue(), - AUTH_SOURCE_PASSWORD: Ext.getCmp("AUTH_SOURCE_PASSWORD").getValue(), - AUTH_SOURCE_VERSION: 3 - }, - - success: function (response, opts) - { - var dataResponse = Ext.util.JSON.decode(response.responseText); - - if (dataResponse.status) { - Ext.MessageBox.show({ - title: _('ID_TEST_CONNECTION'), - msg: (dataResponse.status == "OK")? _('ID_SUCCESSFULLY_CONNECTED') : dataResponse.message, - - icon: (dataResponse.status == "OK")? "ext-mb-ok" : Ext.MessageBox.ERROR, - buttons: {ok: _("ID_ACCEPT")} - }); - } - - loadMaskAux.hide(); - }, - failure: function (response, opts) - { - loadMaskAux.hide(); - } - }); - } - }, - { - text: _("ID_CANCEL"), - handler: function () - { - redirectPage("../authSources/authSources_List?" + randomNum(1, 9999999)); - } - } - ] - }); - - var gridAttribute = ''; - if (typeof(Fields.AUTH_SOURCE_UID) == 'undefined' || Fields.AUTH_SOURCE_UID == '') { - ldapFormProvider.setValue(Fields.AUTH_SOURCE_PROVIDER); - ldapFormAttrinuteIds.setValue(Fields.AUTH_SOURCE_ATTRIBUTE_IDS); - gridAttribute = ''; - } else { - ldapFormId.setValue(Fields.AUTH_SOURCE_UID); - ldapFormName.setValue(Fields.AUTH_SOURCE_NAME); - ldapFormProvider.setValue(Fields.AUTH_SOURCE_PROVIDER); - ldapFormType.setValue(Fields.LDAP_TYPE); - ldapFormAutoRegister.setValue(Fields.AUTH_SOURCE_AUTO_REGISTER); - ldapFormServerName.setValue(Fields.AUTH_SOURCE_SERVER_NAME); - - ldapFormPort.setValue(Fields.AUTH_SOURCE_PORT); - ldapFormTls.setValue(Fields.AUTH_SOURCE_ENABLED_TLS); - ldapFormBaseDN.setValue(Fields.AUTH_SOURCE_BASE_DN); - ldapFormAnonymous.setValue(Fields.AUTH_ANONYMOUS); - ldapFormSearchUser.setValue(Fields.AUTH_SOURCE_SEARCH_USER); - ldapFormPassword.setValue(Fields.AUTH_SOURCE_PASSWORD); - ldapFormIdentifier.setValue(Fields.AUTH_SOURCE_IDENTIFIER_FOR_USER); - ldapFormUsersFilter.setValue(Fields.AUTH_SOURCE_USERS_FILTER); - ldapFormRetiredEmployees.setValue(Fields.AUTH_SOURCE_RETIRED_OU); - - if (typeof(Fields.AUTH_SOURCE_GRID_ATTRIBUTE) != 'undefined') { - gridAttribute = Ext.util.JSON.encode(Fields.AUTH_SOURCE_GRID_ATTRIBUTE); - } - } - - ldapGridStore.load({ - params:{'data': gridAttribute} - }); - - var arrayObject = []; - arrayObject["ldapFormSearchUser"] = ldapFormSearchUser; - arrayObject["ldapFormPassword"] = ldapFormPassword; - - ldapFormAnonymousOnChange(ldapFormAnonymous, arrayObject); - - new Ext.Viewport({ - layout:'fit', - border: false, - items: [ldapForm] - }); - - ldapFormProvider.setValue(Fields.AUTH_SOURCE_PROVIDER); - ldapFormAttrinuteIds.setValue(Fields.AUTH_SOURCE_ATTRIBUTE_IDS); - - Ext.getCmp("AUTH_SOURCE_SHOWGRID-checkbox").setValue(typeof(Fields.AUTH_SOURCE_GRID_ATTRIBUTE) != "undefined"); - ldapGrid.setVisible(typeof(Fields.AUTH_SOURCE_GRID_ATTRIBUTE) != "undefined"); -}); - diff --git a/workflow/engine/templates/ldapAdvanced/searchSummary.js b/workflow/engine/templates/ldapAdvanced/searchSummary.js deleted file mode 100644 index 455436db0..000000000 --- a/workflow/engine/templates/ldapAdvanced/searchSummary.js +++ /dev/null @@ -1,180 +0,0 @@ -var caseData = ''; -var appTitle = new Ext.form.Label({ - fieldLabel: _('ID_CASE_TITLE'), - labelStyle: 'font-weight:bold;padding-right:30px;' -}); - -var process = new Ext.form.Label({ - fieldLabel: _('ID_PROCESS_UID'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var processTitle = new Ext.form.Label({ - fieldLabel: _('ID_PROCESS'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var appUid = new Ext.form.Label({ - fieldLabel: _('ID_APP_UID'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var caseNumber = new Ext.form.Label({ - fieldLabel: _('ID_CASE_NUMBER'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var initUser = new Ext.form.Label({ - fieldLabel: _('ID_INIT_USER'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var finishUser = new Ext.form.Label({ - fieldLabel: _('ID_FINISH_USER'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var createDate = new Ext.form.Label({ - fieldLabel: _('ID_CREATE_DATE'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var finishDate = new Ext.form.Label({ - fieldLabel: _('ID_FINISH_DATE'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var fileName = new Ext.form.Label({ - fieldLabel: _('ID_FILE_NAME'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var statusCaseWin = new Ext.form.Label({ - fieldLabel: _('ID_CASESLIST_APP_STATUS'), - labelStyle: 'font-weight:bold;padding-right:35px;' -}); - -var formCase = new Ext.FormPanel({ - labelWidth : 120, - labelAlign : 'right', - autoScroll: true, - frame: true, - bodyStyle : 'padding-top:20px;padding-left:20px;', - items:[ - appTitle, - caseNumber, - processTitle, - initUser, - finishUser, - createDate, - finishDate, - fileName, - statusCaseWin - ], - buttons:[{ - text : "Restore case", - id: 'BUTTON_UNARCHIVE_CASE', - iconCls: 'button_menu_ext ss_sprite ss_folder_go', - formBind : true, - handler : function(){ - if (caseData!='') { - Ext.MessageBox.confirm("Confirm", "Are you sure you want to restore the case?", function (val) { - if (val == 'yes') { - dataCase = caseData; - Ext.MessageBox.show({ - msg: _('ID_RESTORING_CASE') + ' ' + dataCase.CASE_NUMBER + ' ...', - progressText: _('ID_SAVING'), - width:300, - wait:true, - waitConfig: {interval:200}, - animEl: 'mb7' - }); - Ext.Ajax.request({ - params: { - 'APP_UID': dataCase.APP_UID, - 'FILENAME_TAR': dataCase.FILENAME_TAR, - 'functionExecute': 'unarchiveCase' - }, - url : 'controllers/searchListProxy.php', - success: function (returnData) { - Ext.MessageBox.hide(); - - var resp = Ext.decode(returnData.responseText); - if (resp.success) { - Ext.MessageBox.show({ - title: _('ID_CASE_UNARHIVE'), - msg: _('ID_CASE') + ' ' + dataCase.CASE_NUMBER + ' ' + _('ID_RESTORED_SUCESSFULLY'), - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.INFO - }); - } else { - Ext.MessageBox.show({ - title: _('ID_ERROR'), - msg: resp.message, - buttons: Ext.MessageBox.OK, - animEl: 'mb9', - icon: Ext.MessageBox.ERROR - }); - } - - storeGridSearch.load(); - }, - failure: function () { - Ext.MessageBox.alert("Error", _('ID_ERROR_IN_SERVER')); - } - }); - } - }); - } - } - }, - { - text : _('ID_CLOSE'), - iconCls: 'button_menu_ext ss_sprite ss_folder_delete', - formBind : true, - handler : function(){ - summaryWindow.hide(); - } - }] -}); - -var summaryWindow = new Ext.Window({ - title: _('ID_DETAIL_CASE'), - layout: 'fit', - width: 500, - height: 320, - resizable: true, - closable: true, - closeAction : 'hide', - modal: true, - autoScroll:true, - constrain: true, - items: [formCase] -}); - -function showCaseSummary(dataCase) { - if (dataCase) { - caseData = dataCase; - - if(dataCase.STATUS == 'RESTORED'){ - Ext.getCmp('BUTTON_UNARCHIVE_CASE').disable(); - } else { - Ext.getCmp('BUTTON_UNARCHIVE_CASE').enable(); - } - - appTitle.setText(dataCase.APP_TITLE, false); - process.setText(dataCase.PRO_UID, false); - processTitle.setText(dataCase.PRO_TITLE, false); - appUid.setText(dataCase.APP_UID, false); - caseNumber.setText(dataCase.CASE_NUMBER, false); - initUser.setText(dataCase.INIT_USER_NAME, false); - finishUser.setText(dataCase.FINISH_USER_NAME, false); - createDate.setText(renderDate(dataCase.CREATE_DATE, false)); - finishDate.setText(renderDate(dataCase.FINISH_DATE, false)); - fileName.setText(dataCase.FILENAME_TAR+'.tar', false); - statusCaseWin.setText(dataCase.STATUS, false); - - summaryWindow.show(); - } -} \ No newline at end of file diff --git a/workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml b/workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml deleted file mode 100644 index f12719a4f..000000000 --- a/workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml b/workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml deleted file mode 100644 index 47f95847b..000000000 --- a/workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - <en><![CDATA[Ldap Advance Plugin]]></en> - <pt-BR><![CDATA[Ldap Plugin Adiantamento]]></pt-BR> - - - - - - diff --git a/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml b/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml deleted file mode 100644 index 6d29c5bad..000000000 --- a/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - <en><![CDATA[Authentication Source Information]]></en> - <pt-BR><![CDATA[Informações de fonte de autenticação]]></pt-BR> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Match attributes to sync]]> - Combinar atributos para sincronizar]]> - - - - - - - - - - - - - - - - - - - - - diff --git a/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag b/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag deleted file mode 100644 index 63791173b..000000000 --- a/workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag +++ /dev/null @@ -1 +0,0 @@ -Bandera para habilitar nueva interfaz extjs