-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathedit-config.twig
46 lines (43 loc) · 1.92 KB
/
edit-config.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<h3>{{ _t('EDIT_CONFIG_TITLE') }}</h3>
<form action="" method="post" name="edit-config" id="edit-config" class="form-horizontal">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% for group, data in keysList %}
<div class="panel panel-{{ group == 'core' ? 'primary' : 'default' }}">
<button class="panel-heading collapsed" id="head_{{ group }}" data-parent="#accordion" data-toggle="collapse" href="#{{ group }}">
<h4 class="panel-title">
{% set groupTitle = 'EDIT_CONFIG_GROUP_' ~ group|upper %}
{{ (_t(groupTitle) == groupTitle) ? group|upper : _t(groupTitle) }}
</h4>
</button>
<div id="{{ group }}" class="panel-collapse collapse">
<div class="panel-body">
{% for key,value in data %}
<div class="field-container">
<label for="{{ key }}">{{ help[key] ?? key }}</label>
{% if help[key] %}<span> - {{ key }}</span>{% endif %}
<input type="text" class="form-control" id="{{ key }}" name="{{ key }}" value="{{ value }}"
{{ help[key] ? 'aria-describedby="' ~ key ~ 'Help"' }}
{% if placeholders[key] is not null -%}placeholder="{{ _t('EDIT_CONFIG_CURRENT_VALUE') }}: {{ placeholders[key] }}"{%- endif %}
/>
</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
{# DO NOT REMOVE THE FOLLOWING LINE THAT IS DEFINED FOR POST ACTIONS__.php#}
<!-- end of #edit-config form -->
<input type="hidden" name="{{ SAVE_NAME }}" value="1">
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<button type="submit" name="valider" class="btn btn-primary">
{{ _t('BAZ_VALIDER') }}
</button>
</div>
</div>
</form>
<style>
#edit-config { margin-top: 2rem; }
.field-container { margin: 1rem 0; }
</style>