From 087dc38ec6d97e7ae5e6fe5192a7834926fbce2c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 22 Sep 2017 11:08:37 +0200 Subject: [PATCH] SystemOptions.js - add http_proxy option --- js/SystemOptions.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/js/SystemOptions.js b/js/SystemOptions.js index 1d6b09f..d308244 100644 --- a/js/SystemOptions.js +++ b/js/SystemOptions.js @@ -31,6 +31,33 @@ Ext.define('PMG.SystemOptions', { itemdblclick: 'onEdit', }, + add_proxy_row: function(name, text, opts) { + var me = this; + + opts = opts || {}; + me.rows = me.rows || {}; + + me.rows[name] = { + required: true, + defaultValue: Proxmox.Utils.noneText, + header: text, + editor: { + xtype: 'proxmoxWindowEdit', + subject: text, + items: { + xtype: 'proxmoxtextfield', + vtype: 'HttpProxy', + name: name, + deleteEmpty: true, + emptyText: Proxmox.Utils.noneText, + labelWidth: Proxmox.Utils.compute_min_label_width( + text, opts.labelWidth), + fieldLabel: text + } + } + }; + }, + initComponent : function() { var me = this; @@ -46,6 +73,8 @@ Ext.define('PMG.SystemOptions', { me.add_text_row('email', gettext("Administrator EMail"), { deleteEmpty: true, defaultValue: Proxmox.Utils.noneText }); + me.add_proxy_row('http_proxy', gettext("HTTP proxy")); + me.callParent(); me.on('activate', me.rstore.startUpdate);