RoleSelector.js: widget to select user role

This commit is contained in:
Dietmar Maurer 2017-03-27 13:07:43 +02:00
parent ec1dd829db
commit c0ffdd0046
3 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,7 @@
JSSRC= \
Utils.js \
LoginWindow.js \
RoleSelector.js \
ServerStatus.js \
ServerAdministration.js \
LDAPProfileSelector.js \

10
js/RoleSelector.js Normal file
View File

@ -0,0 +1,10 @@
Ext.define('PMG.RoleSelector', {
extend: 'Proxmox.form.KVComboBox',
alias: 'widget.pmgRoleSelector',
comboItems: [
['admin', gettext('Administrator')],
['qmanager', gettext('Quarantine Manager')],
['audit', gettext('Auditor')]
]
});

View File

@ -64,8 +64,9 @@ Ext.define('PMG.UserEdit', {
column1.push(
{
xtype: 'textfield',
xtype: 'pmgRoleSelector',
name: 'role',
disabled: me.userid === 'root@pam',
allowBlank: false,
fieldLabel: gettext('Role')
},