Allow old plugins without `d-modal-body` to work

This commit is contained in:
Robin Ward 2016-11-24 11:24:06 -05:00
parent 66f68e8faf
commit 5ba653d604
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ export default function(name, opts) {
const renderArgs = { into: 'modal', outlet: 'modalBody'}; const renderArgs = { into: 'modal', outlet: 'modalBody'};
if (controller) { renderArgs.controller = controllerName; } if (controller) { renderArgs.controller = controllerName; }
if (opts.addModalBodyView) {
renderArgs.view = 'modal-body';
}
const modalName = `modal/${templateName}`; const modalName = `modal/${templateName}`;
const fullName = opts.admin ? `admin/templates/${modalName}` : modalName; const fullName = opts.admin ? `admin/templates/${modalName}` : modalName;
route.render(fullName, renderArgs); route.render(fullName, renderArgs);