mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
fix issue-94 can't edit users
This commit is contained in:
@@ -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'];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user