fix issue-94 can't edit users

This commit is contained in:
Sebastian Sdorra
2012-02-08 09:37:22 +01:00
parent 7ab0b5950e
commit d332358aa7

View File

@@ -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
}];
@@ -106,6 +106,10 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
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'];
},