<template name="optionsModal">
    <div class="modal" id="optionsModal" tabindex="-1" role="dialog" aria-labelledby="optionsModalLabel">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="optionsModalLabel">Clinical Trial Options</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-12">
                            <h3>Select one or more Trial Criteria types:</h3>
                                {{ #each trialCriteriaTypes}}
                                    <label for="{{id}}Criteria" class="trialCriteriaLabel">
                                        <!-- TODO: Change to checkbox for multiple criteria !-->
                                        <input type="radio" name="trialCriteria" id="{{id}}Criteria" value='{{id}}' class="trialCriteria" checked={{selected}}>
                                         {{name}}
                                    </label>
                                {{ /each }}
                            <div>
                                <h3>Selected Trial Criteria:</h3>
                                {{ #each trialCriteriaTypes}}
                                    {{ #if selected }}
                                        <div class="trialCriteriaPanel panel fade in" id="{{id}}Description">
                                            {{> Template.dynamic template=descriptionTemplate }}
                                        </div>
                                    {{ /if }}
                                {{ /each }}
                            </div>
                        </div>
                    </div>
                    <br/>
                    <div class="row">
                        <div class="col-md-12">
                            <h4>Additional Options</h4>
                            <a type="button" class="btn btn-danger clearAllStudyTimepointAssociations">
                                <i class="fa fa-trash"></i> Clear All Study/Timepoint Associations
                            </a>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
</template>