Handle lists type options in plugins configuration
[cascardo/ipsilon.git] / templates / admin / plugin_config.html
index d95bf75..e722aa1 100644 (file)
         {% for o in options_order %}
             <div class="form-group">
             <label for="{{ o }}">{{ o }}:</label>
-                <input type="text" class="form-control" name="{{ o }}" value="{{ options[o][2] }}">
+              {% set val = plugin.get_config_value(o) %}
+              {% if val is string %}
+                <input type="text" class="form-control" name="{{ o }}" value="{{ val }}">
+              {% else %}
+                <input type="text" class="form-control" name="{{ o }}" value="{{ val|join(', ') }}">
+              {% endif %}
             </div>
-            <span class="help-block">{{ options[o][0] }}</span>
+            <span class="help-block">{{ plugin.get_config_desc(o) }}</span>
         {% endfor %}
 
         <button id="submit" class="btn btn-primary" name="submit" type="submit" value="Submit">