Handle lists type options in plugins configuration
[cascardo/ipsilon.git] / templates / admin / plugin_config.html
1 {% extends "master-admin.html" %}
2 {% block main %}
3     <h2>{{ title }}</h2>
4     {% if message %}
5     <div class="alert alert-{{message_type}}">
6         <p>{{ message }}</p>
7     </div>
8     {% endif %}
9     <div id="options">
10         <form role="form" id="{{ name }}" action="{{ action }}" method="post" enctype="application/x-www-form-urlencoded">
11
12         {% for o in options_order %}
13             <div class="form-group">
14             <label for="{{ o }}">{{ o }}:</label>
15               {% set val = plugin.get_config_value(o) %}
16               {% if val is string %}
17                 <input type="text" class="form-control" name="{{ o }}" value="{{ val }}">
18               {% else %}
19                 <input type="text" class="form-control" name="{{ o }}" value="{{ val|join(', ') }}">
20               {% endif %}
21             </div>
22             <span class="help-block">{{ plugin.get_config_desc(o) }}</span>
23         {% endfor %}
24
25         <button id="submit" class="btn btn-primary" name="submit" type="submit" value="Submit">
26             Save
27         </button>
28         <a href="{{ back }}" class="btn btn-default" title="Back">Back</a>
29         </form>
30     </div>
31 {% endblock %}