Skip to content
Snippets Groups Projects
Commit c6b8ef57 authored by Robert Anderson's avatar Robert Anderson
Browse files

Pass userID to function for adding attribute to user

parent 066ed0bf
No related branches found
No related tags found
No related merge requests found
function showAdminUserAttributesWindow(id) { function showAdminUserAttributesWindow(userID) {
var AdminUserAttributesWindow = new Ext.ux.GenericGridWindow( var AdminUserAttributesWindow = new Ext.ux.GenericGridWindow(
// Window config // Window config
...@@ -22,7 +22,7 @@ function showAdminUserAttributesWindow(id) { ...@@ -22,7 +22,7 @@ function showAdminUserAttributesWindow(id) {
tooltip:'Add attribute', tooltip:'Add attribute',
iconCls:'add', iconCls:'add',
handler: function() { handler: function() {
showAdminUserAttributeAddEditWindow(); showAdminUserAttributeAddEditWindow(userID);
} }
}, },
'-', '-',
...@@ -35,7 +35,7 @@ function showAdminUserAttributesWindow(id) { ...@@ -35,7 +35,7 @@ function showAdminUserAttributesWindow(id) {
// Check if we have selected item // Check if we have selected item
if (selectedItem) { if (selectedItem) {
// If so display window // If so display window
showAdminUserAttributeAddEditWindow(selectedItem.data.ID); showAdminUserAttributeAddEditWindow(userID,selectedItem.data.ID);
} else { } else {
AdminUserAttributesWindow.getEl().mask(); AdminUserAttributesWindow.getEl().mask();
...@@ -116,7 +116,7 @@ function showAdminUserAttributesWindow(id) { ...@@ -116,7 +116,7 @@ function showAdminUserAttributesWindow(id) {
// Store config // Store config
{ {
baseParams: { baseParams: {
ID: id, ID: userID,
SOAPUsername: globalConfig.soap.username, SOAPUsername: globalConfig.soap.username,
SOAPPassword: globalConfig.soap.password, SOAPPassword: globalConfig.soap.password,
SOAPAuthType: globalConfig.soap.authtype, SOAPAuthType: globalConfig.soap.authtype,
...@@ -142,15 +142,15 @@ function showAdminUserAttributesWindow(id) { ...@@ -142,15 +142,15 @@ function showAdminUserAttributesWindow(id) {
// Display edit/add form // Display edit/add form
function showAdminUserAttributeAddEditWindow(id) { function showAdminUserAttributeAddEditWindow(userID,attrID) {
var submitAjaxConfig; var submitAjaxConfig;
// We doing an update // We doing an update
if (id) { if (attrID) {
submitAjaxConfig = { submitAjaxConfig = {
ID: id, ID: attrID,
SOAPFunction: 'updateAdminUserAttribute', SOAPFunction: 'updateAdminUserAttribute',
SOAPParams: SOAPParams:
'0:ID,'+ '0:ID,'+
...@@ -160,8 +160,10 @@ function showAdminUserAttributeAddEditWindow(id) { ...@@ -160,8 +160,10 @@ function showAdminUserAttributeAddEditWindow(id) {
// We doing an Add // We doing an Add
} else { } else {
submitAjaxConfig = { submitAjaxConfig = {
SOAPFunction: 'createAdminUserAttribute', UserID: userID,
SOAPFunction: 'addAdminUserAttribute',
SOAPParams: SOAPParams:
'0:UserID,'+
'0:Name' '0:Name'
}; };
} }
...@@ -203,10 +205,10 @@ function showAdminUserAttributeAddEditWindow(id) { ...@@ -203,10 +205,10 @@ function showAdminUserAttributeAddEditWindow(id) {
adminGroupFormWindow.show(); adminGroupFormWindow.show();
if (id) { if (attrID) {
adminGroupFormWindow.getComponent('formpanel').load({ adminGroupFormWindow.getComponent('formpanel').load({
params: { params: {
ID: id, ID: attrID,
SOAPUsername: globalConfig.soap.username, SOAPUsername: globalConfig.soap.username,
SOAPPassword: globalConfig.soap.password, SOAPPassword: globalConfig.soap.password,
SOAPAuthType: globalConfig.soap.authtype, SOAPAuthType: globalConfig.soap.authtype,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment