From d332358aa7c835e6d901c28d2e4dadc62e9a6fd6 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 8 Feb 2012 09:37:22 +0100 Subject: [PATCH 1/2] fix issue-94 can't edit users --- .../main/webapp/resources/js/user/sonia.user.formpanel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scm-webapp/src/main/webapp/resources/js/user/sonia.user.formpanel.js b/scm-webapp/src/main/webapp/resources/js/user/sonia.user.formpanel.js index a19ce5d471..580ef9f33d 100644 --- a/scm-webapp/src/main/webapp/resources/js/user/sonia.user.formpanel.js +++ b/scm-webapp/src/main/webapp/resources/js/user/sonia.user.formpanel.js @@ -62,14 +62,14 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ fieldLabel: this.displayNameText, name: 'displayName', allowBlank: false, - readOnly: this.item != null && this.item != 'xml', + readOnly: this.isReadOnly(), helpText: this.displayNameHelpText },{ fieldLabel: this.mailText, name: 'mail', allowBlank: true, vtype: 'email', - readOnly: this.item != null && this.item != 'xml', + readOnly: this.isReadOnly(), helpText: this.mailHelpText }]; @@ -105,6 +105,10 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ Ext.apply(this, Ext.apply(this.initialConfig, {items: items})); Sonia.user.FormPanel.superclass.initComponent.apply(this, arguments); }, + + isReadOnly: function(){ + return this.item != null && this.item.type != 'xml'; + }, fixRequest: function(user){ delete user['password-confirm']; From 59014e8152b555fda2093a12b93f283edb6a61b3 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 9 Feb 2012 08:15:55 +0100 Subject: [PATCH 2/2] close branch issue-94