From: Jaroslav Kysela Date: Tue, 1 Dec 2015 08:17:18 +0000 (+0100) Subject: WEBUI: Don't show apply button in the hardware input tree forms X-Git-Tag: v4.2.1~1427 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c47ef219234edb0a6a652732a330e519b94a13c;p=thirdparty%2Ftvheadend.git WEBUI: Don't show apply button in the hardware input tree forms --- diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index e54958a79..4b4a15ee5 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -950,23 +950,25 @@ tvheadend.idnode_editor = function(item, conf) }); buttons.push(saveBtn); - var applyBtn = new Ext.Button({ - text: _('Apply'), - iconCls: 'apply', - handler: function() { - var node = panel.getForm().getFieldValues(); - node.uuid = conf.uuids ? conf.uuids : item.uuid; - tvheadend.Ajax({ - url: 'api/idnode/save', - params: { - node: Ext.encode(node) - }, - success: function(d) { - } - }); - } - }); - buttons.push(applyBtn); + if (!conf.noApply) { + var applyBtn = new Ext.Button({ + text: _('Apply'), + iconCls: 'apply', + handler: function() { + var node = panel.getForm().getFieldValues(); + node.uuid = conf.uuids ? conf.uuids : item.uuid; + tvheadend.Ajax({ + url: 'api/idnode/save', + params: { + node: Ext.encode(node) + }, + success: function(d) { + } + }); + } + }); + buttons.push(applyBtn); + } if (conf.help) { var helpBtn = new Ext.Button({ @@ -2227,6 +2229,7 @@ tvheadend.idnode_tree = function(panel, conf) width: 550, noautoWidth: true, fixedHeight: true, + noApply: true, help: conf.help || null }); mpanel.add(current);