2012-05-20 12:20:50 +02:00
|
|
|
<form method="post" action="">
|
|
|
|
<table class="mod config-editor">
|
|
|
|
<tr>
|
|
|
|
<th class="minimal">Name</th>
|
|
|
|
<th>Value</th>
|
|
|
|
<th class="minimal">Type</th>
|
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
|
|
|
{% for var in conf if var.type != 'array' %}
|
|
|
|
{% if var.name|count == 1 %}
|
|
|
|
{% set name = 'cf_' ~ var.name %}
|
|
|
|
{% else %}
|
|
|
|
{% set name = 'cf_' ~ var.name|join('/') %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<th class="minimal">
|
|
|
|
{% if var.name|count == 1 %}
|
|
|
|
{{ var.name }}
|
|
|
|
{% else %}
|
|
|
|
{{ var.name|join(' → ') }}
|
|
|
|
{% endif %}
|
|
|
|
</th>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
{% if var.type == 'string' %}
|
|
|
|
<input name="{{ name }}" type="text" value="{{ var.value|e }}">
|
2013-08-03 11:41:01 +02:00
|
|
|
{% elseif var.permissions %}
|
2013-08-01 21:20:25 +02:00
|
|
|
<select name="{{ name }}">
|
|
|
|
<option value="{{ constant('JANITOR') }}"{% if var.value == constant('JANITOR')%} selected{% endif %}>JANITOR</option>
|
|
|
|
<option value="{{ constant('MOD') }}"{% if var.value == constant('MOD')%} selected{% endif %}>MOD</option>
|
|
|
|
<option value="{{ constant('ADMIN') }}"{% if var.value == constant('ADMIN')%} selected{% endif %}>ADMIN</option>
|
|
|
|
<option value="{{ constant('DISABLED') }}"{% if var.value == constant('DISABLED')%} selected{% endif %}>DISABLED</option>
|
|
|
|
</select>
|
2012-05-20 12:20:50 +02:00
|
|
|
{% elseif var.type == 'integer' %}
|
|
|
|
<input name="{{ name }}" type="number" value="{{ var.value|e }}">
|
|
|
|
{% elseif var.type == 'boolean' %}
|
|
|
|
<input name="{{ name }}" type="checkbox" {% if var.value %}checked{% endif %}>
|
|
|
|
{% else %}
|
|
|
|
?
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if var.type == 'integer' or var.type == 'boolean' %}
|
|
|
|
<small>Default: <code>{{ var.default }}</code></small>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="minimal">
|
|
|
|
{{ var.type|e }}
|
|
|
|
</td>
|
|
|
|
|
2013-08-03 11:44:39 +02:00
|
|
|
<td style="word-wrap:break-word;width:50%">
|
|
|
|
{{ var.comment|join(' ') }}
|
2012-05-20 12:20:50 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<ul style="padding:0;text-align:center;list-style:none">
|
|
|
|
<li><input name="save" type="submit" value="{% trans 'Save changes' %}"></li>
|
|
|
|
</ul>
|
|
|
|
</form>
|
|
|
|
|