mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:03:45 +08:00
Allow old plugins without d-modal-body
to work
This commit is contained in:
parent
66f68e8faf
commit
5ba653d604
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user