pmg-gui/js/LDAPUserSelector.js
Dominik Csapak 64fb657f83 improve gettext usage
optimized a few string
EMail/Email/E-mail -> E-Mail
No Data in Database/No data in database. -> No data in database
etc.

removed 'Outlook 2007' from gettext
added some strings to gettext where they were missing
(e.g. Active, etc.)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-24 06:26:26 +01:00

74 lines
1.1 KiB
JavaScript

Ext.define('PMG.LDAPUserSelector', {
extend: 'Proxmox.form.ComboGrid',
alias: 'widget.pmgLDAPUserSelector',
profile: undefined,
store: {
fields: [ 'account', 'pmail', 'dn' ],
filterOnLoad: true,
sorters: [
{
property : 'account',
direction: 'ASC'
}
]
},
valueField: 'account',
displayField: 'account',
allowBlank: false,
listConfig: {
columns: [
{
header: gettext('Account'),
dataIndex: 'account',
hideable: false,
width: 100
},
{
header: gettext('E-Mail'),
dataIndex: 'pmail',
width: 150
},
{
header: 'DN',
dataIndex: 'dn',
width: 200
}
]
},
setProfile: function(profile, force) {
var me = this;
if (!force && (profile === undefined || profile === null || me.profile === profile)) {
return;
}
me.profile = profile;
me.setValue('');
me.store.setProxy({
type: 'proxmox',
url: '/api2/json/config/ldap/' + me.profile + '/users'
});
me.store.load();
},
initComponent: function() {
var me = this;
me.callParent();
if (me.profile !== undefined) {
me.setProfile(me.profile, true);
}
}
});