diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-01 15:20:25 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-01 15:20:25 -0400 |
| commit | 6b6f32949df7be58c7a9125711aeab2c34cd1d54 (patch) | |
| tree | 65a31cd396aae1c9fee4054bd629c5650a4a2491 /templates/mod/config-editor.html | |
| parent | 0fe552857468aa12097a74e08f51f5aaa983be07 (diff) | |
Web config editor: Use a <select> for JANITOR/MOD/ADMIN permissions
Diffstat (limited to 'templates/mod/config-editor.html')
| -rw-r--r-- | templates/mod/config-editor.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html index ec7213bb..41e01dad 100644 --- a/templates/mod/config-editor.html +++ b/templates/mod/config-editor.html @@ -25,6 +25,13 @@ <td> {% if var.type == 'string' %} <input name="{{ name }}" type="text" value="{{ var.value|e }}"> + {% elseif var.type == 'integer' and var.name.0 == 'mod' and (var.default in ['JANITOR', 'MOD', 'ADMIN', 'DISABLED'] or var.default|slice(0, 14) == "$config['mod']") and var.value <= constant('DISABLED') %} + <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> {% elseif var.type == 'integer' %} <input name="{{ name }}" type="number" value="{{ var.value|e }}"> {% elseif var.type == 'boolean' %} |
