From 5ba653d6046cd623216094ceac7a0720362c3568 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 24 Nov 2016 11:24:06 -0500 Subject: [PATCH] Allow old plugins without `d-modal-body` to work --- app/assets/javascripts/discourse/lib/show-modal.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/lib/show-modal.js.es6 b/app/assets/javascripts/discourse/lib/show-modal.js.es6 index e34d7398ef0..c0a50a83044 100644 --- a/app/assets/javascripts/discourse/lib/show-modal.js.es6 +++ b/app/assets/javascripts/discourse/lib/show-modal.js.es6 @@ -21,6 +21,10 @@ export default function(name, opts) { const renderArgs = { into: 'modal', outlet: 'modalBody'}; if (controller) { renderArgs.controller = controllerName; } + if (opts.addModalBodyView) { + renderArgs.view = 'modal-body'; + } + const modalName = `modal/${templateName}`; const fullName = opts.admin ? `admin/templates/${modalName}` : modalName; route.render(fullName, renderArgs);