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, fieldLabel: this.displayNameText,
name: 'displayName', name: 'displayName',
allowBlank: false, allowBlank: false,
readOnly: this.item != null && this.item != 'xml', readOnly: this.isReadOnly(),
helpText: this.displayNameHelpText helpText: this.displayNameHelpText
},{ },{
fieldLabel: this.mailText, fieldLabel: this.mailText,
name: 'mail', name: 'mail',
allowBlank: true, allowBlank: true,
vtype: 'email', vtype: 'email',
readOnly: this.item != null && this.item != 'xml', readOnly: this.isReadOnly(),
helpText: this.mailHelpText helpText: this.mailHelpText
}]; }];
@@ -105,6 +105,10 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
Ext.apply(this, Ext.apply(this.initialConfig, {items: items})); Ext.apply(this, Ext.apply(this.initialConfig, {items: items}));
Sonia.user.FormPanel.superclass.initComponent.apply(this, arguments); Sonia.user.FormPanel.superclass.initComponent.apply(this, arguments);
}, },
isReadOnly: function(){
return this.item != null && this.item.type != 'xml';
},
fixRequest: function(user){ fixRequest: function(user){
delete user['password-confirm']; delete user['password-confirm'];