forked from 0x2620/pandora
in usersDialog, remove hardcoded user levels
This commit is contained in:
parent
3fb3c6ef38
commit
83069889db
1 changed files with 3 additions and 4 deletions
|
@ -8,7 +8,6 @@ pandora.ui.usersDialog = function() {
|
||||||
dialogWidth = Math.round(window.innerWidth * 0.9),
|
dialogWidth = Math.round(window.innerWidth * 0.9),
|
||||||
formWidth = 256,
|
formWidth = 256,
|
||||||
numberOfUsers = 0,
|
numberOfUsers = 0,
|
||||||
userLevels = ['member', 'friend', 'staff', 'admin'],
|
|
||||||
|
|
||||||
$guestsCheckbox = Ox.Checkbox({
|
$guestsCheckbox = Ox.Checkbox({
|
||||||
checked: true,
|
checked: true,
|
||||||
|
@ -495,12 +494,12 @@ pandora.ui.usersDialog = function() {
|
||||||
}),
|
}),
|
||||||
Ox.Select({
|
Ox.Select({
|
||||||
id: 'level',
|
id: 'level',
|
||||||
items: userLevels.map(function(level) {
|
items: Ox.map(pandora.site.userLevels, function(level, i) {
|
||||||
return {
|
return i ? {
|
||||||
checked: level == user.level,
|
checked: level == user.level,
|
||||||
id: level,
|
id: level,
|
||||||
title: Ox.toTitleCase(level)
|
title: Ox.toTitleCase(level)
|
||||||
};
|
} : null;
|
||||||
}),
|
}),
|
||||||
label: 'Level',
|
label: 'Level',
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
|
|
Loading…
Reference in a new issue