Dotclear

source: plugins/aboutConfig/admtpl/index.html.twig @ 1517:055caf38ee9f

Revision 1517:055caf38ee9f, 2.5 KB checked in by Dsls, 11 years ago (diff)

removed superfluous debug log
Added twig function "form_hidden" to display hidden fields where the user wants, instead of just before the end of form
(enables to be hxtml validator-friendly)

Line 
1{% extends "layout.html.twig" %}
2
3{% block header %}
4  {{ parent() }}
5  {{ init_tabs() }}
6  <link rel="stylesheet" href="{{plugin_url}}aboutConfig/style/aboutConfig.css" type="text/css" media="screen" />
7  <script type="text/javascript" src="{{plugin_url}}aboutConfig/js/aboutConfig.js"></script>
8{% endblock %}
9
10{%block content %}
11  {{ parent() }}
12
13  {% tab local('local',__('blog settings')) %}
14    {% if local_settings is not empty %}
15    {% form 'local_nav_form' %}
16     <p class="anchor-nav">{{ form_field('local_nav') }} {{ form_field('local_nav_submit') }}{{form_hidden()}}</p>
17    {% endform %}
18    {% endif %}
19
20    {% form 'local_settings_form' %}
21    {% for ns, setting in local_settings %}
22     <table class="settings" id="local_{{ ns }}"><caption>{{ ns }}</caption>
23     <thead>
24     <tr>
25     <th class="nowrap">Setting ID</th>
26     <th>{{__('Value')}}</th>
27     <th>{{__('Type')}}</th>
28     <th class="maximal">{{__('Description')}}</th>
29     </tr>
30     </thead>
31     <tbody>
32    {% for key,value in setting %}
33    {% set fname = 'local_' ~ ns ~ '_' ~ key %}
34     <tr>
35     <td scope="raw"><label for="{{ fname }}">{% if value.global %}<strong>{{ key }}</strong>{% else %}{{ key }}{% endif %}</label></td>
36     <td>{% if value.type == 'boolean' %}{{ form_field(fname) }}{% else %}{{ form_field(fname,{'size':40}) }}{% endif %}</td>
37     <td>{{ value.type }}</td>
38     <td>{{ value.label }}</td>
39     </tr>
40    {% endfor %}
41     </tbody></table>
42    {% endfor %}
43     <p>{{ form_field('local_submit') }}{{form_hidden()}}</p>
44    {% endform %}
45  {% endtab %}
46
47  {% tab global('global',__('global settings')) %}
48    {% if global_settings is not empty %}
49    {% form 'global_nav_form' %}
50     <p class="anchor-nav">{{ form_field('global_nav') }} {{ form_field('global_nav_submit') }}{{form_hidden()}}</p>
51    {% endform %}
52    {% endif %}
53
54    {% form 'global_settings_form' %}
55    {% for ns, setting in global_settings %}
56     <table class="settings" id="global_{{ ns }}"><caption>{{ ns }}</caption>
57     <thead>
58     <tr>
59     <th class="nowrap">Setting ID</th>
60     <th>{{__('Value')}}</th>
61     <th>{{__('Type')}}</th>
62     <th class="maximal">{{__('Description')}}</th>
63     </tr>
64     </thead><tbody>
65    {% for key,value in setting %}
66    {% set fname = 'global_' ~ ns ~ '_' ~ key %}
67     <tr>
68     <td scope="raw"><label for="{{ fname }}">{{ key }}</label></td>
69     <td>{% if value.type == 'boolean' %}{{ form_field(fname) }}{% else %}{{ form_field(fname,{'size':40}) }}{% endif %}</td>
70     <td>{{ value.type }}</td>
71     <td>{{ value.label }}</td>
72     </tr>
73    {% endfor %}
74     </tbody></table>
75    {% endfor %}
76     <p>{{ form_field('global_submit') }}{{form_hidden()}}</p>
77    {% endform %}
78  {% endtab %}
79
80{% endblock %}
Note: See TracBrowser for help on using the repository browser.

Sites map