question tweak - max length for sms message
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 18 Nov 2013 10:35:08 +0000 (11:35 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 15 Jan 2014 10:28:04 +0000 (11:28 +0100)
wtem/templates/wtem/exercises/open.html

index 7572390..f12e052 100644 (file)
         {% for field in exercise.fields %}
             <div class="wtem-open-field">
                 <label class="wtem-caption">{{field.caption}}</label>
-                <textarea style="width: 100%;" rows="10" data-field-id="{{field.id}}"></textarea>
+                <textarea style="width: 100%;" rows="{{field.rows|default:10}}" data-field-id="{{field.id}}" {% if field.max_length %}maxlength="{{field.max_length}}"{% endif %}></textarea>
             </div>
         {% endfor %}
     {% else %}
-        <textarea style="width: 100%; margin-top:10px;" rows="10"></textarea>
+        <textarea style="width: 100%; margin-top:10px;" rows="{{field.rows|default:10}}" {% if field.max_length %}maxlength="{{field.max_length}}"{% endif %}></textarea>
     {% endif %}
 
     {% if exercise.description_after %}