mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-18 17:14:04 +01:00
Web config editor: Use a <select> for JANITOR/MOD/ADMIN permissions
This commit is contained in:
parent
47823b5071
commit
538e88b7bd
@ -999,7 +999,7 @@
|
|||||||
// Bypass flood check
|
// Bypass flood check
|
||||||
$config['mod']['flood'] = ADMIN;
|
$config['mod']['flood'] = ADMIN;
|
||||||
// Raw HTML posting
|
// Raw HTML posting
|
||||||
$config['mod']['rawhtml'] = MOD;
|
$config['mod']['rawhtml'] = DISABLED;
|
||||||
|
|
||||||
/* Administration */
|
/* Administration */
|
||||||
// View the report queue
|
// View the report queue
|
||||||
|
@ -25,6 +25,13 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if var.type == 'string' %}
|
{% if var.type == 'string' %}
|
||||||
<input name="{{ name }}" type="text" value="{{ var.value|e }}">
|
<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' %}
|
{% elseif var.type == 'integer' %}
|
||||||
<input name="{{ name }}" type="number" value="{{ var.value|e }}">
|
<input name="{{ name }}" type="number" value="{{ var.value|e }}">
|
||||||
{% elseif var.type == 'boolean' %}
|
{% elseif var.type == 'boolean' %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user