diff --git a/pluginHandler.js b/pluginHandler.js index 4b8f5b81..011e0e94 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -115,8 +115,15 @@ module.exports.pluginHandler = function (parent) { meshserver.send({ action: 'addplugin', url: Q('pluginurlinput').value}); }; obj.addPluginDlg = function() { - setDialogMode(2, "Plugin Download URL", 3, obj.addPluginEx, '
WARNING: Downloading plugins may compromise server security. Only download from trusted sources.
'); - focusTextBox('pluginurlinput'); + if (typeof showModal === 'function') { + setDialogMode(2, "Plugin Download URL", 3, obj.addPluginEx, 'WARNING: Downloading plugins may compromise server security. Only download from trusted sources.
'); + showModal('xxAddAgentModal', 'idx_dlgOkButton', obj.addPluginEx); + focusTextBox('pluginurlinput'); + } else { + // Fallback to setDialogMode for default.handlebars + setDialogMode(2, "Plugin Download URL", 3, obj.addPluginEx, 'WARNING: Downloading plugins may compromise server security. Only download from trusted sources.
'); + focusTextBox('pluginurlinput'); + } }; obj.refreshPluginHandler = function() { let st = document.createElement('script');