I have a modal dialog template that is setup like this:
<div class="overlay">
<div class="modal-content">
{{#if isNote}}
{{> note patient=patient}}
{{else}}
{{> consultation patient=patient}}
{{/if}}
</div>
<div class="modal-footer>
<button id="acceptAction">Accept</button>
</div>
</div>
Now when the user clicks the acceptAction
button I’d like the child template to trigger a save
function. Unfortunately some of these functions will be pretty complex, so I’d like to keep these strictly within the template, but there can be a function with the same nae for each of the children. Is there a best practice way of calling this function via the child template?