PageRenderTime 70ms CodeModel.GetById 65ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_survey/templates/_survey_question_likert.tpl

https://code.google.com/p/zotonic/
Smarty Template | 14 lines | 13 code | 1 blank | 0 comment | 11 complexity | 3acb5199fb7904ad51991c26f5bbfdea MD5 | raw file
 1{% with answers[name] as ans %}
 2<p>{{ question.question|escape }}</p>
 3<ul>
 4	<li class="first">{_ Strongly Disagree _}</li>
 5	<li><label class="choices"><input id="{{ #q1 }}" name="{{ name }}" type="radio" value="1" {% if ans == "1" %}checked="checked"{% endif %} /> 1</label></li>
 6	<li><label class="choices"><input id="{{ #q2 }}" name="{{ name }}" type="radio" value="2" {% if ans == "2" %}checked="checked"{% endif %} /> 2</label></li>
 7	<li><label class="choices"><input id="{{ #q3 }}" name="{{ name }}" type="radio" value="3" {% if ans == "3" %}checked="checked"{% endif %} /> 3</label></li>
 8	<li><label class="choices"><input id="{{ #q4 }}" name="{{ name }}" type="radio" value="4" {% if ans == "4" %}checked="checked"{% endif %} /> 4</label></li>
 9	<li><label class="choices"><input id="{{ #q5 }}" name="{{ name }}" type="radio" value="5" {% if ans == "5" %}checked="checked"{% endif %} /> 5</label></li>
10	<li class="first">{_ Strongly Agree _}</li>
11</ul>
12{% endwith %}
13{% if question.is_required %}{% validate id=#q1 name=name type={presence} %}{% endif %}
14