mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-12 12:46:38 +02:00
[ticket/15699] Add progress bar and use template macros
PHPBB3-15699
This commit is contained in:
@ -61,34 +61,23 @@
|
||||
<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>
|
||||
{% for name, options in provider.get_options %}
|
||||
{% set title = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper %}
|
||||
{% set description = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper ~ '_EXPLAIN' %}
|
||||
{% set input_id = storage.get_name ~ '_' ~ provider.get_name ~ '_' ~ name %}
|
||||
{% set input_type = options['type'] %}
|
||||
{% set input_name = storage.get_name ~ '[' ~ name ~ ']' %}
|
||||
{% set input_value = attribute(config, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name) %}
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="{{ input_id }}">{{ lang(title) }}{{ lang('COLON') }}</label>
|
||||
{% set title = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper %}
|
||||
{% set description = 'STORAGE_ADAPTER_' ~ provider.get_name | upper ~ '_OPTION_' ~ name | upper ~ '_EXPLAIN' %}
|
||||
<label>{{ lang(title) }}{{ lang('COLON') }}</label>
|
||||
{% if lang_defined(description) %}
|
||||
<br /><span>{{ lang(description) }}</span>
|
||||
{% endif %}
|
||||
</dt>
|
||||
<dd>
|
||||
{% if input_type in ['text', 'password', 'email'] %}
|
||||
<input id="{{ input_id }}" type="{{ input_type }}" name="{{ input_name }}" value="{{ input_value }}" maxlength="{{ options['maxlength'] ?: 255 }}" />
|
||||
{% elseif input_type == 'textarea' %}
|
||||
<textarea id="{{ input_id }}" name="{{ input_name }}">{{ input_value }}</textarea>
|
||||
{% elseif input_type == 'radio' %}
|
||||
{% for option_name, option_value in options['options'] %}
|
||||
<input type="radio" name="{{ input_name }}" value="{{ option_value }}" class="radio"{% if loop.first %} id="{{ input_id }}"{% endif %}{{ (option_value == input_value) ? ' checked="checked"' }}> {{ lang(option_name) }}
|
||||
{% endfor %}
|
||||
{% elseif input_type == 'select' %}
|
||||
<select name="{{ input_name }}" id="{{ input_id }}">
|
||||
{% for option_name, option_value in options['options'] %}
|
||||
<option value="{{ option_value }}"{{ (option_value == input_value) ? ' selected' }}>{{ lang(option_name) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% set input_name = storage.get_name ~ '[' ~ name ~ ']' %}
|
||||
{% set input_value = attribute(config, 'storage\\' ~ storage.get_name ~ '\\config\\' ~ name) %}
|
||||
|
||||
{% if options['type'] in ['text', 'password', 'email'] %}
|
||||
{{ FormsBuildTemplate(options | merge({"name": input_name, "value": input_value})) }}
|
||||
{% elseif options['type'] == 'textarea' %}
|
||||
{{ FormsBuildTemplate(options | merge({"name": input_name, "content": input_value})) }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -4,27 +4,27 @@
|
||||
|
||||
<h1>{{ lang('STORAGE_TITLE') }}</h1>
|
||||
|
||||
<script>
|
||||
// <![CDATA[
|
||||
/**
|
||||
* Popup storage update progress bar
|
||||
*/
|
||||
function popup_progress_bar()
|
||||
{
|
||||
close_waitscreen = 0;
|
||||
// no scrollbars
|
||||
popup('{{ UA_PROGRESS_BAR }}', 400, 240, '_storage');
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
<p>{{ lang('STORAGE_TITLE_EXPLAIN') }}</p>
|
||||
|
||||
<p>{{ lang('CONTINUE_EXPLAIN') }}</p>
|
||||
|
||||
<form id="acp_storage_continue" method="post" action="{{ U_CONTINUE_UPDATING }}">
|
||||
<fieldset class="submit-buttons">
|
||||
<form id="acp_storage_continue" method="post" action="{{ U_ACTION }}">
|
||||
<fieldset>
|
||||
<legend>{{ lang('SUBMIT') }}</legend>
|
||||
<input class="button1" type="submit" id="continue" name="continue" value="{{ lang('CONTINUE') }}" onclick="popup_progress_bar();" />
|
||||
<input class="button2" type="submit" id="cancel" name="cancel" value="{{ lang('CANCEL') }}" />
|
||||
|
||||
{% if CONTINUE_PROGRESS %}
|
||||
<div class="centered-text">
|
||||
<br>
|
||||
<progress
|
||||
value="{{ CONTINUE_PROGRESS.VALUE }}"
|
||||
max="{{ CONTINUE_PROGRESS.TOTAL }}"
|
||||
style="height: 2em; width: 20em;"></progress><br>
|
||||
{{ CONTINUE_PROGRESS.PERCENTAGE|number_format(2) ~ ' %' }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="continue" name="continue" value="{{ lang('SUBMIT') }}" />
|
||||
<input class="button2" type="submit" id="cancel" name="cancel" value="{{ lang('CANCEL') }}" />
|
||||
</p>
|
||||
{{ S_FORM_TOKEN }}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
20
phpBB/adm/style/acp_storage_update_progress.html
Normal file
20
phpBB/adm/style/acp_storage_update_progress.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<div class="successbox">
|
||||
<h3>{{ INDEXING_TITLE }}</h3>
|
||||
<p>
|
||||
{{ INDEXING_EXPLAIN }}
|
||||
{% if INDEXING_PROGRESS_BAR %}
|
||||
<br>
|
||||
<progress
|
||||
value="{{ INDEXING_PROGRESS_BAR.VALUE }}"
|
||||
max="{{ INDEXING_PROGRESS_BAR.TOTAL }}"
|
||||
style="height: 2em; width: 20em;"></progress><br>
|
||||
{{ INDEXING_PROGRESS_BAR.PERCENTAGE|number_format(2) ~ ' %' }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% include 'overall_footer.html' %}
|
Reference in New Issue
Block a user