PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_survey/templates/_survey_question_shortanswer.tpl

http://github.com/zotonic/zotonic
Smarty Template | 16 lines | 15 code | 1 blank | 0 comment | 6 complexity | f7dcdc8f609f71ff74aa685df68edafb MD5 | raw file
 1{% with answers[question.id][question.name][2]  as value %}
 2<p>{{ question.question|escape }}</p>
 3<input id="{{ #short }}" name="{{ question.name }}" type="text" value="{{ value|escape }}" />
 4{% if question.name == "email" %}
 5  {% if question.is_required %}
 6    {% validate id=#short name=question.name type={presence} type={email} %}
 7  {% else %}
 8    {% validate id=#short name=question.name type={email} %}
 9  {% endif %}
10{% else %}
11  {% if question.is_required %}
12    {% validate id=#short name=question.name type={presence} %}
13  {% endif %}
14{% endif %}
15
16{% endwith %}