-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I often find myself to add a modal view to a form. So I'm wondering if it would be in the scope of this package to add a new function along these lines :
Modal.showWithTemplate = (template,data,title) ->
Modal.show("ModalTemplate",{template: template, data: data, title: title})
Where the template would be something like this :
<template name="ModalTemplate">
<div id={{template}} class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
{{title}}
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">X</span> <span class="sr-only">{{_ "close"}}</span>
</button>
</div>
<div class="modal-body">
{{> Template.dynamic template=template data=data}}
</div>
</div>
</div>
</div>
</template>
This simple function would allow the reuse of a single template for many modals.
If you think this could be a worthy addition, and if you don't have time to do it yourself,
I'll be happy to prepare a PR .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels