options-ui.twig
5.45 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<div id="wpml-translation-feedback-options" class="wpml-section" data-nonce="{{ nonce }}" data-action="{{ action }}">
<form>
<div class="wpml-section-header">
<h3>{{ strings.section_title }}</h3>
</div>
<div class="wpml-settings-group wpml-section-content">
<p class="js-wpml-tf-settings-block wpml-tf-form-line">
<label for="wpml-tf-enable-translation-feedback">
<input type="checkbox" id="wpml-tf-enable-translation-feedback"
name="enabled" value="{{ module_toggle.value }}" class="js-wpml-tf-trigger-save"
{% if module_toggle.selected %} checked="checked"{% endif %}
data-target=".js-wpml-tf-options-toggle-target">
{{ module_toggle.label }}
</label>
{% include 'options-ui-request-status.twig' %}
</p>
<div class="js-wpml-tf-full-options alignleft" {% if not module_toggle.selected %} style="display:none;"{% endif %}>
<div class="js-wpml-tf-settings-block wpml-tf-button-mode">
<h4>{{ strings.button_mode_section_title }} {% include 'options-ui-request-status.twig' %}</h4>
<ul>
{% for mode in button_modes %}
{% set input_id = 'wpml_tf_button_mode_' ~ mode.value %}
<li>
<label for="{{ input_id }}">
<input type="radio" name="button_mode" id="{{ input_id }}"
class="js-wpml-tf-trigger-save" value="{{ mode.value }}"
{% if mode.selected %} checked="checked"{% endif %}>
{% if mode.link %}
{% set link_before %}<a class="wpml-external-link" href="{{ mode.link }}" target="_blank">{% endset %}
{{ mode.label|format(link_before, '</a>')|raw }}
{% else %}
{{ mode.label }}
{% endif %}
</label>
</li>
{% endfor %}
</ul>
</div>
<div class="js-wpml-tf-settings-block wpml-tf-icon-style">
<h4>{{ strings.icon_style_section_title }} {% include 'options-ui-request-status.twig' %}</h4>
<ul>
{% for style in icon_styles %}
{% set input_id = 'wpml_tf_icon_style_' ~ style.value %}
<li>
<input type="radio" name="icon_style" id="{{ input_id }}"
class="js-wpml-tf-trigger-save" value="{{ style.value }}"
{% if style.selected %} checked="checked"{% endif %}>
<label for="{{ input_id }}" class="{{ style.image_class }}"></label>
</li>
{% endfor %}
</ul>
</div>
<div class="js-wpml-tf-settings-block wpml-tf-languages-to">
<h4>{{ strings.languages_to_section_title }} {% include 'options-ui-request-status.twig' %}</h4>
<ul>
{% for language in languages_to %}
{% set input_id = 'wpml_tf_languages_to_' ~ language.value %}
<li>
<label for="{{ input_id }}">
<input type="checkbox" name="languages_to[]" id="{{ input_id }}"
class="js-wpml-tf-trigger-save" value="{{ language.value }}"
{% if language.selected %} checked="checked"{% endif %}>
<img width="18" height="12" src="{{ language.flag_url }}" alt="{{ language.value }}">
{{ language.label }}
</label>
</li>
{% endfor %}
</ul>
</div>
<div class="js-wpml-tf-settings-block wpml-tf-expiration">
<h4>{{ strings.expiration_section_title }} {% include 'options-ui-request-status.twig' %}</h4>
<ul>
{% for mode in display_modes %}
{% set input_id = 'wpml_tf_display_mode_' ~ mode.value %}
<li>
<label for="{{ input_id }}">
<input type="radio" name="display_mode" id="{{ input_id }}"
class="js-wpml-tf-trigger-save" value="{{ mode.value }}"
{% if mode.selected %} checked="checked"{% endif %}>
{% if mode.value == 'custom' %}
{% include 'options-ui-custom-expiration.twig' with { 'disabled': not mode.selected } %}
{% else %}
{{ mode.label }}
{% endif %}
</label>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</form>
</div>