mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +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,
|
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
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@@ -106,6 +106,10 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
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'];
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user