From 4ab5ff873cbd93336937991e756f92f2463485ee Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 29 Sep 2014 16:23:01 +0200 Subject: [PATCH] Show groups in preferences if users has groups --- static/js/preferencesDialog.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/static/js/preferencesDialog.js b/static/js/preferencesDialog.js index 6a7fe4ca7..1c6bdb057 100644 --- a/static/js/preferencesDialog.js +++ b/static/js/preferencesDialog.js @@ -75,6 +75,18 @@ pandora.ui.preferencesDialog = function() { value: Ox.toTitleCase(pandora.user.level), width: 320 }), + ].concat( + pandora.user.groups.length ? [ + Ox.Input({ + disabled: true, + id: 'groups', + label: Ox._('Groups'), + labelWidth: 120, + value: pandora.user.groups.join(', '), + width: 320 + }) + ] : [] + ).concat([ Ox.Checkbox({ id: 'newsletter', label: Ox._('Newsletter'), @@ -95,7 +107,7 @@ pandora.ui.preferencesDialog = function() { } }) - ] + ]) }) .css({position: 'absolute', left: '96px', top: '16px'}) );