myaac/system/templates/install.config.html.twig
slawkens 49af260c2e Some features for docker users
Disable IP Check on install
automatically fill out server_path
2023-09-17 14:39:02 +02:00

56 lines
2.4 KiB
Twig

{% if errors is not empty %}
<div class="alert alert-danger">
{% for error in errors %}
<span>{{ error }}</span>
{% endfor %}
</div>
{% endif %}
<form action="{{ constant('BASE_URL') }}install/" method="post" autocomplete="off">
<input type="hidden" name="step" id="step" value="database" />
{% for value in ['server_path'] %}
{% if value == 'server_path' and config.server_path is not null %}
{% set server_path = { 'var_server_path': config.server_path } %}
{% set session = session | merge (server_path) %}
{% endif %}
<div class="form-group mb-2">
<label for="vars_{{ value }}">{{ locale['step_config_' ~ value] }}</label>
<input class="form-control" type="text" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
<small class="form-text text-muted">{{ locale['step_config_' ~ value ~ '_desc'] }}</small>
</div>
{% endfor %}
<div class="form-group mb-2">
<label for="vars_date_timezone">{{ locale.step_config_timezone }}</label>
<select class="form-control" name="vars[date_timezone]" id="vars_date_timezone">
{% for timezone in timezones %}
<option value="{{ timezone }}"{% if (session['var_date_timezone'] is not null and session['var_date_timezone'] == timezone) or (session['var_date_timezone'] is null and timezone == 'Europe/Warsaw') %} selected{% endif %}>{{ timezone }}</option>
{% endfor %}
</select>
<small class="form-text text-muted">{{ locale.step_config_timezone_desc }}</small>
</div>
<div class="form-group mb-2">
<label for="vars_client">{{ locale.step_config_client }}</label>
<select class="form-control" name="vars[client]" id="vars_client">
{% for id, version in clients %}
<option value="{{ id }}"{% if session['var_client'] is not null and session['var_client'] == id %} selected{% endif %}>{{ version }}</option>
{% endfor %}
</select>
<small class="form-text text-muted">{{ locale.step_config_client_desc }}</small>
</div>
<div class="form-group mb-2">
<label for="vars_usage">{{ locale.step_config_usage }}</label>
<input type="hidden" value="0" name="vars[usage]">
<input type="checkbox" name="vars[usage]" id="vars_usage" value="1"{% if session['var_usage'] is null or session['var_usage'] == 1 %} checked{% endif %}/>
<small class="form-text text-muted d-block">{{ locale.step_config_usage_desc }}</small>
</div>
<div class="text-center m-3">
{{ buttons|raw }}
</div>
</form>