mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15289] Update acp template
PHPBB3-15289
This commit is contained in:
parent
04a34d9f4f
commit
0b75f1e46a
3 changed files with 29 additions and 40 deletions
|
@ -1,4 +1,3 @@
|
||||||
{% import 'forms.html' as forms %}
|
|
||||||
<!-- INCLUDE overall_header.html -->
|
<!-- INCLUDE overall_header.html -->
|
||||||
|
|
||||||
<a id="maincontent"></a>
|
<a id="maincontent"></a>
|
||||||
|
@ -30,13 +29,35 @@
|
||||||
<fieldset id="{{ storage.get_name }}_{{ provider.get_name }}_settings">
|
<fieldset id="{{ storage.get_name }}_{{ provider.get_name }}_settings">
|
||||||
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}</legend>
|
<legend>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }} - {{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_NAME') }}</legend>
|
||||||
{% for name, options in provider.get_options %}
|
{% for name, options in provider.get_options %}
|
||||||
{% set l_name = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper %}
|
<dl>
|
||||||
{% set options = options|merge({'name': storage.get_name ~ '[' ~ name ~ ']'}) %}
|
<dt>
|
||||||
{% set options = options|merge({'value': attribute(CONFIG, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name)}) %}
|
<label for="">{{ lang('STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper) }}{{ lang('COLON') }}</label>{% if description is not empty %}<br /><span>{{ lang(description) }}</span>{% endif %}
|
||||||
{{ forms.form_row(
|
</dt>
|
||||||
forms.form_label(l_name),
|
<dd>
|
||||||
forms.form_control(options)
|
{% set input_type = options['type'] %}
|
||||||
) }}
|
{% set input_name = storage.get_name ~ '[' ~ name ~ ']' %}
|
||||||
|
{% set input_value = attribute(CONFIG, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name) %}
|
||||||
|
|
||||||
|
{% if
|
||||||
|
input_type == 'text' or
|
||||||
|
input_type == 'password' or
|
||||||
|
input_type == 'email' %}
|
||||||
|
<input id="" type="{{ input_type }}" name="{{ input_name }}" value="{{ input_value }}" maxlength="{{ options['maxlength'] ?: 255 }}" />
|
||||||
|
{% elseif input_type == 'textarea' %}
|
||||||
|
<textarea id="" name="{{ input_name }}">{{ input_value }}</textarea>
|
||||||
|
{% elseif input_type == 'radio' %}
|
||||||
|
{% for option_name, option_value in options['options'] %}
|
||||||
|
<label><input type="radio" name="{{ input_name }}" value="{{ option_value }}" class="radio" id=""{{ (option_value == input_value) ? ' checked="checked"' }}>{{ lang(option_name) }}</textarea></label>
|
||||||
|
{% endfor %}
|
||||||
|
{% elseif input_type == 'select' %}
|
||||||
|
<select name="{{ input_name }}">
|
||||||
|
{% for option_name, option_value in options['options'] %}
|
||||||
|
<option value="{{ option_value }}"{{ (option_value == input_value) ? ' selected' }}>{{ lang(option_name) }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{% macro input(name, value, type, size) %}
|
|
||||||
<input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro textarea(name, value, rows, cols) %}
|
|
||||||
<textarea name="{{ name }}" rows="{{ rows|default(10) }}" cols="{{ cols|default(40) }}">{{ value|e }}</textarea>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro form_control(params) %}
|
|
||||||
{% if params['type'] == 'text' %}
|
|
||||||
{{ _self.input(params['name'], params['value'], params['type']) }}
|
|
||||||
{% endif %}
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro form_label(name, description = '') %}
|
|
||||||
<label for="">{{ lang(name) }}</label>{% if description is not empty %}<br /><span>{{ lang(description) }}</span>{% endif %}
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro form_row(left_content, right_content) %}
|
|
||||||
<dl>
|
|
||||||
<dt>
|
|
||||||
{{ left_content }}
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
{{ right_content}}
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
{% endmacro %}
|
|
|
@ -11,10 +11,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue