-
Notifications
You must be signed in to change notification settings - Fork 987
/
switch.php
61 lines (61 loc) · 2.61 KB
/
switch.php
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
<div class="inputtype--toggle-container">
<div class="btn-group" role="group"
aria-labelledby="label-<?= CHtml::getIdByName($inputBaseName); ?>"
<?= ($this->setting['help']) ? 'aria-describedby="help-' . CHtml::getIdByName($inputBaseName) . '"' : "" ?>
>
<?php if ($this->setting['value'] == "1") : ?>
<input
class="btn-check"
type="radio"
id="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_1"
name="<?= $inputBaseName ?>"
value="1"
checked
/>
<label
for="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_1"
class="btn btn-outline-secondary"
>
<?= gT('On'); ?>
</label>
<input
class="btn-check"
type="radio"
name="<?= $inputBaseName ?>"
id="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_0"
value="0"
/>
<label
for="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_0"
class="btn btn-outline-secondary">
<?= gT('Off'); ?>
</label>
<?php else : ?>
<input
class="btn-check"
type="radio"
name="<?= $inputBaseName ?>"
id="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_1"
value="1"
/>
<label
for="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_1"
class="btn btn-outline-secondary">
<?= gT('On'); ?>
</label>
<input
class="btn-check"
type="radio"
id="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_0"
name="<?= $inputBaseName ?>"
value="0"
checked
/>
<label
for="advancedSettings[<?= strtolower((string) $this->setting['category']); ?>][<?= $this->setting['name']; ?>]_0"
class="btn btn-outline-secondary">
<?= gT('Off'); ?>
</label>
<?php endif; ?>
</div>
</div>