Page MenuHomec4science

questionnaire_wizzard.html
No OneTemporary

File Metadata

Created
Sat, Nov 23, 13:33

questionnaire_wizzard.html

<template name="questionnaireWizzard">
<div class="questionnaireWizzard">
{{#HammerTouchArea gestureMap=templateGestures}}
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<div class="title-wrapper">
<h2 class="modal-title">{{title}}</h2>
</div>
<div class="regulations">
{{#unless preview}}
<table>
<tr>
<td>Current case manager:&nbsp;</td> <td>{{userDescription}}&nbsp;&nbsp;</td>
<td>Patient:&nbsp;</td> <td>{{patientDescription}}&nbsp;</td>
</tr>
<tr>
{{#if language}}
<td>Language:</td><td>{{language}}</td>
{{else}}
<td></td><td></td>
{{/if}}
<td>Visit:&nbsp;</td> <td>{{visit.title}}&nbsp;</td>
</tr>
<tr>
<td></td><td></td>
<td>Study:&nbsp;</td> <td>{{studyTitle}}</td>
</tr>
</table>
{{else}}
{{#if hasLangs}}
<select id="source-lang" class="form-control">
{{#each langs}}
<option value={{code}}>{{name}} ({{nativeName}}) {{suffix}}</option>
{{/each}}
</select>
{{/if}}
{{/unless}}
</div>
</div>
<div class="modal-body question">
{{#each questionsForPage}}
<!-- augment with question and answer -->
{{#with patient=../patient questionnaire=questionnaire visit=../visit
question=. answer=(answerForQuestion ../visit._id _id) readonly=readonly
preview=preview display=(displayQuestion ../visit._id .)}}
{{#if eq_or question.type "description" "table" "table_polar"}}
<form id={{question._id}} class="questionForm"
fields="answer" novalidate="novalidate" style={{display}}
data-conditional={{question.conditional}}>
<div class="form-group" data-required="true">
{{#if eq question.type "description"}}
{{#markdown}}{{question.label}}{{/markdown}}
{{/if}}
{{#if eq question.type "table"}}
{{> questionTable}}
{{/if}}
{{#if eq question.type "table_polar"}}
{{> questionTablePolar}}
{{/if}}
</div>
</form>
{{else}}
{{#if preview}}
<p class="code">{{questionnaire.id}}_{{question.code}}</p>
{{/if}}
{{#if display}}
{{/if}}
{{#autoForm doc=doc schema=answerFormSchema id=question._id
type=formType class="questionAutoform" fields="value"
style=display data-conditional=question.conditional}}
{{> afQuickFields name=this.name}}
{{/autoForm}}
{{/if}}
{{/with}}
<br>
{{else}}
Question not found, sorry!
{{/each}}
<div class="nav-buttons">
{{#unless isOnLastPageOfLastQuestionnaire}}
<button type="button" id="next" class="btn btn-primary">Save &amp; Next <i class="fa fa-chevron-right"></i></button>
{{else}}
<button type="button" id="next" class="btn btn-primary">Save &amp; Close</button>
{{/unless}}
{{#unless isOnFirstPage}}
<button type="button" id="back" class="btn btn-primary"><i class="fa fa-chevron-left"></i> Save &amp; Back</button>
{{/unless}}
</div>
</div>
<div class="modal-footer">
<span class="pull-left questionOverview">
{{#each pages}}
<span class="fa-stack fa-lg cursorPointer jumpToPage {{css}}">
<i class="fa fa-circle fa-stack-2x activeCircle"></i>
<i class="fa fa-circle fa-stack-2x"></i>
<strong class="fa-stack-1x">{{index}}</strong>
</span>
{{/each}}
</span>
<button type="button" id="close" class="btn btn-warning">Close</button>
</div>
</div>
</div>
</div>
{{/HammerTouchArea}}
</div>
</template>

Event Timeline