summaryrefslogtreecommitdiff
path: root/templates/mod/config-editor.html
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-08-27 02:28:04 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-08-27 02:28:04 +1000
commit6a705fd8c2324b642ac6bfc660d76cff6d5eab62 (patch)
tree7f916bebf46f66ed55569ea1456686524aebc192 /templates/mod/config-editor.html
parent1dcb385e9e3791d2d3c1d049fe9b8d906539088e (diff)
parentc919e7362542117f613c2800017ae89c269a07b5 (diff)
Merge branch 'mod-rewrite'
Conflicts: inc/lib/Twig/Extensions/Extension/Tinyboard.php install.php mod.php stylesheets/style.css templates/index.html templates/page.html templates/thread.html
Diffstat (limited to 'templates/mod/config-editor.html')
-rw-r--r--templates/mod/config-editor.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html
new file mode 100644
index 00000000..ec7213bb
--- /dev/null
+++ b/templates/mod/config-editor.html
@@ -0,0 +1,56 @@
+<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(' &rarr; ') }}
+ {% endif %}
+ </th>
+
+ <td>
+ {% if var.type == 'string' %}
+ <input name="{{ name }}" type="text" value="{{ var.value|e }}">
+ {% 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>
+
+ <td>
+ {{ var.comment|join('<br>') }}
+ </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>
+