-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisplay.page
161 lines (128 loc) · 4.76 KB
/
Display.page
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Icon="icons/displaysettings.png"
Menu="Preferences"
Title="Display Preferences"
---
<script>
$(document).ready(function() {
presetTime(document.display_settings);
});
function prepareDisplay(form) {
if (!form.number.value) form.number.value='.,';
}
function presetTime(form) {
form.time.disabled = form.date.value=='%c';
}
function resetDisplay(form) {
form.date.selectedIndex = 0;
form.time.selectedIndex = 1;
form.time.disabled = true;
form.number.selectedIndex = 0;
form.unit.selectedIndex = 0;
form.scale.selectedIndex = 0;
form.align.selectedIndex = 2;
form.view.selectedIndex = 0;
form.blink.selectedIndex = 1;
form.devices.selectedIndex = 1;
form.total.selectedIndex = 1;
form.spin.selectedIndex = 1;
form.size.selectedIndex = 1;
form.banner.selectedIndex = 1;
form.icons.selectedIndex = 1;
form.help.selectedIndex = 0;
}
</script>
<form markdown="1" name="display_settings" method="POST" action="/plugins/webGui/update_cfg.php" target="progressFrame" onsubmit="prepareDisplay(this)">
<input type="hidden" name="#file" value="/boot/config/plugins/webGui/webGui.cfg" />
<input type="hidden" name="#section" value="display" />
Date format:
: <select name="date" size="1" onchange="presetTime(this.form);">
<?=mk_option($display['date'], "%c", "System Setting")?>
<?=mk_option($display['date'], "%A, %Y %B %e", "Day, YYYY Month D")?>
<?=mk_option($display['date'], "%A, %e %B %Y", "Day, D Month YYYY")?>
<?=mk_option($display['date'], "%A, %B %e, %Y", "Day, Month D, YYYY")?>
<?=mk_option($display['date'], "%A, %m/%d/%Y", "Day, MM/DD/YYYY")?>
<?=mk_option($display['date'], "%A, %d-%m-%Y", "Day, DD-MM-YYYY")?>
<?=mk_option($display['date'], "%A, %d.%m.%Y", "Day, DD.MM.YYYY")?>
<?=mk_option($display['date'], "%A, %Y-%m-%d", "Day, YYYY-MM-DD")?>
</select>
Time format:
: <select name="time" size="1">
<?=mk_option($display['time'], "%I:%M %p", "12 hours")?>
<?=mk_option($display['time'], "%R", "24 hours")?>
</select>
Number format:
: <select name="number" size="1">
<?=mk_option($display['number'], ".,", "American")?>
<?=mk_option($display['number'], ",.", "European")?>
</select>
Temperature unit:
: <select name="unit" size="1">
<?=mk_option($display['unit'], "C", "Celcius")?>
<?=mk_option($display['unit'], "F", "Fahrenheit")?>
</select>
Number scaling:
: <select name="scale" size="1">
<?=mk_option($display['scale'], "-1", "Automatic")?>
<?=mk_option($display['scale'], "0", "Disabled")?>
<?=mk_option($display['scale'], "1", "KB")?>
<?=mk_option($display['scale'], "2", "MB")?>
<?=mk_option($display['scale'], "3", "GB")?>
<?=mk_option($display['scale'], "4", "TB")?>
<?=mk_option($display['scale'], "5", "PB")?>
</select>
Number alignment:
: <select name="align" size="1">
<?=mk_option($display['align'], "left", "Left")?>
<?=mk_option($display['align'], "center", "Center")?>
<?=mk_option($display['align'], "right", "Right")?>
</select>
Table view spacing:
: <select name="view" size="1">
<?=mk_option($display['view'], "", "Normal")?>
<?=mk_option($display['view'], "small", "Narrow")?>
<?=mk_option($display['view'], "wide", "Wide")?>
</select>
View of spun-down disks:
: <select name="blink" size="1">
<?=mk_option($display['blink'], "0", "Dimmed")?>
<?=mk_option($display['blink'], "1", "Blinking")?>
</select>
Display unassigned disks:
: <select name="devices" size="1">
<?=mk_option($display['devices'], "0", "No")?>
<?=mk_option($display['devices'], "1", "Yes")?>
</select>
Display array totals:
: <select name="total" size="1">
<?=mk_option($display['total'], "0", "No")?>
<?=mk_option($display['total'], "1", "Yes")?>
</select>
Allow individual disk spin up/down:
: <select name="spin" size="1">
<?=mk_option($display['spin'], "0", "No")?>
<?=mk_option($display['spin'], "1", "Yes")?>
</select>
Disk identification with size notation:
: <select name="size" size="1">
<?=mk_option($display['size'], "0", "No")?>
<?=mk_option($display['size'], "1", "Yes")?>
</select>
Show banner image:
: <select name="banner" size="1">
<?=mk_option($display['banner'], "", "No")?>
<?=mk_option($display['banner'], "image", "Yes")?>
</select>
Show section icons:
: <select name="icons" size="1">
<?=mk_option($display['icons'], "", "No")?>
<?=mk_option($display['icons'], "1", "Yes")?>
</select>
Display Help:
: <select name="help" size="1">
<?=mk_option($display['help'], "", "No")?>
<?=mk_option($display['help'], "1", "Yes")?>
</select>
<button type="button" onclick="resetDisplay(this.form);">Default</button>
: <input type="submit" name="#apply" value="Apply">
<button type="button" onclick="done();">Done</button>
</form>