summaryrefslogtreecommitdiffstats
path: root/templates/admin/plugin_config.html
blob: 1372f55e4bda0129bf8ae4c6427fc79e1792ad10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% extends "master-admin.html" %}
{% block main %}
{% if user.is_admin %}

    <div class = "row">
        <div class="col-md-3 col-sm-3 col-xs-6">
            <h2>{{ title }}</h2>
        </div>
        <div class="col-md-3 col-sm-3 col-xs-6" role="alert">
          {% if message %}
            <div class="alert alert-{{message_type}}">
                <p>{{ message }}</p>
            </div>
          {% endif %}
        </div>
    </div>

    <hr>

    <div id="options">
        <form class="form-horizontal" role="form" id="{{ name }}" action="{{ action }}" method="post" enctype="application/x-www-form-urlencoded">

        {% for o in options_order %}
            <div class="form-group">
              <label class="col-sm-2" for="{{ o }}">{{ o }}:</label>
              <div class="col-sm-10">
              {% 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 %}
                <span class="help-block">{{ plugin.get_config_desc(o) }}</span>
              </div>
            </div>
            <hr>
        {% endfor %}

          <p>
            <button id="submit" class="btn btn-primary" name="submit" type="submit" value="Submit">
            Save
            </button>
            <a href="{{ back }}" class="btn btn-default" title="Back">Back</a>
          </p>
        </form>
    </div>

{% endif %}
{% endblock %}