]>
git.proxmox.com Git - pve-manager.git/blob - www/manager/form/RealmComboBox.js
1 Ext
.define('PVE.form.RealmComboBox', {
2 extend
: 'Ext.form.field.ComboBox',
3 requires
: ['Ext.data.Store', 'PVE.RestProxy'],
4 alias
: ['widget.pveRealmComboBox'],
6 initComponent: function() {
9 var stateid
= 'pveloginrealm';
11 var realmstore
= Ext
.create('Ext.data.Store', {
26 displayField
: 'comment',
27 getState: function() {
28 return { value
: this.getValue() };
30 applyState : function(state
) {
31 if (state
&& state
.value
) {
32 this.setValue(state
.value
);
35 stateEvents
: [ 'select' ],
37 id
: stateid
, // fixme: remove (Stateful does not work without)
44 callback: function(r
, o
, success
) {
46 var def
= me
.getValue();
47 if (!def
|| !realmstore
.findRecord('realm', def
)) {
49 Ext
.each(r
, function(record
) {
50 if (record
.data
&& record
.data
["default"]) {
51 def
= record
.data
.realm
;