]> git.proxmox.com Git - pmg-gui.git/commitdiff
use LanguageEditWindow from widget-toolkit
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 17 Apr 2020 11:23:37 +0000 (13:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 20 Apr 2020 10:14:32 +0000 (12:14 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/QuarantineView.js

index 3d0e9e1d8d7bd130db7ff4c4a5690d9b19c533a7..1958a2d000a9e9108b15ac9e00ea8149197b138d 100644 (file)
@@ -131,31 +131,8 @@ Ext.define('PMG.QuarantineView', {
        },
 
        changeLanguage: function() {
-           Ext.create('Ext.window.Window', {
-               title: gettext('Language'),
-               bodyPadding: 10,
-               items: [
-                   {
-                       xtype: 'proxmoxLanguageSelector',
-                       fieldLabel: gettext('Language'),
-                       value: Ext.util.Cookies.get('PMGLangCookie') || 'en',
-                   },
-               ],
-
-               buttons: [
-                   {
-                       text: gettext('OK'),
-                       handler: function() {
-                           let me = this;
-                           let win = this.up('window');
-                           let value = win.down('proxmoxLanguageSelector').getValue();
-                           var dt = Ext.Date.add(new Date(), Ext.Date.YEAR, 10);
-                           Ext.util.Cookies.set('PMGLangCookie', value, dt);
-                           win.mask(gettext('Please wait...'), 'x-mask-loading');
-                           window.location.reload();
-                       },
-                   }
-               ]
+           Ext.create('Proxmox.window.LanguageEditWindow', {
+               cookieName: 'PMGLangCookie'
            }).show();
        },