Add access keys for folder pane
[squirrelmail.git] / include / options / accessibility.php
CommitLineData
8949acd6 1<?php
2
3/**
4 * options_accessibility.php
5 *
6 * Displays all options concerning accessibility features in SquirrelMail.
7 *
8 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package squirrelmail
12 */
13
14/** Define the group constants for this options page. */
fbffe024 15define('SMOPT_GRP_ACCESSKEYS_MENUBAR', 0);
16define('SMOPT_GRP_ACCESSKEYS_MAILBOX', 1);
17define('SMOPT_GRP_ACCESSKEYS_READ_MESSAGE', 2);
18define('SMOPT_GRP_ACCESSKEYS_COMPOSE', 3);
f99c4469 19define('SMOPT_GRP_ACCESSKEYS_FOLDER_LIST', 4);
20define('SMOPT_GRP_ACCESSKEYS_OPTIONS', 5);
8949acd6 21
22/**
23 * This function builds an array with all the information about
24 * the options available to the user, and returns it. The options
25 * are grouped by the groups in which they are displayed.
26 * For each option, the following information is stored:
27 * - name: the internal (variable) name
28 * - caption: the description of the option in the UI
29 * - type: one of SMOPT_TYPE_*
30 * - refresh: one of SMOPT_REFRESH_*
31 * - size: one of SMOPT_SIZE_*
32 * - save: the name of a function to call when saving this option
33 * @return array all option information
34 */
35function load_optpage_data_accessibility() {
36
37 global $a_to_z;
38 $my_a_to_z = array_merge(array('NONE' => _("Not used")), $a_to_z);
39
40 /* Build a simple array into which we will build options. */
41 $optgrps = array();
42 $optvals = array();
43
44 /******************************************************/
45 /* LOAD EACH GROUP OF OPTIONS INTO THE OPTIONS ARRAY. */
46 /******************************************************/
47
fbffe024 48 /*** Load the Access Key Options for the Menubar into the array ***/
49 $optgrps[SMOPT_GRP_ACCESSKEYS_MENUBAR] = _("Access Keys For Top Menu (All Screens)");
50 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR] = array();
51
52 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
53 'name' => 'accesskey_menubar_compose',
54 'caption' => _("Compose"),
55 'type' => SMOPT_TYPE_STRLIST,
56 'refresh' => SMOPT_REFRESH_NONE,
57 'posvals' => $my_a_to_z,
58 );
59
60 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
61 'name' => 'accesskey_menubar_addresses',
62 'caption' => _("Addresses"),
63 'type' => SMOPT_TYPE_STRLIST,
64 'refresh' => SMOPT_REFRESH_NONE,
65 'posvals' => $my_a_to_z,
66 );
67
68 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
69 'name' => 'accesskey_menubar_folders',
70 'caption' => _("Folders"),
71 'type' => SMOPT_TYPE_STRLIST,
72 'refresh' => SMOPT_REFRESH_NONE,
73 'posvals' => $my_a_to_z,
74 );
75
76 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
77 'name' => 'accesskey_menubar_options',
78 'caption' => _("Options"),
79 'type' => SMOPT_TYPE_STRLIST,
80 'refresh' => SMOPT_REFRESH_NONE,
81 'posvals' => $my_a_to_z,
82 );
83
84 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
85 'name' => 'accesskey_menubar_search',
86 'caption' => _("Search"),
87 'type' => SMOPT_TYPE_STRLIST,
88 'refresh' => SMOPT_REFRESH_NONE,
89 'posvals' => $my_a_to_z,
90 );
91
92 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
93 'name' => 'accesskey_menubar_help',
94 'caption' => _("Help"),
95 'type' => SMOPT_TYPE_STRLIST,
96 'refresh' => SMOPT_REFRESH_NONE,
97 'posvals' => $my_a_to_z,
98 );
99
100 $optvals[SMOPT_GRP_ACCESSKEYS_MENUBAR][] = array(
101 'name' => 'accesskey_menubar_signout',
102 'caption' => _("Sign Out"),
103 'type' => SMOPT_TYPE_STRLIST,
104 'refresh' => SMOPT_REFRESH_NONE,
105 'posvals' => $my_a_to_z,
106 );
107
108
109 /*** Load the Access Key Options for the Mailbox page into the array ***/
110 $optgrps[SMOPT_GRP_ACCESSKEYS_MAILBOX] = _("Access Keys For Message List Screen");
111 $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX] = array();
112
113//FIXME -- TODO...
114// $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
115// 'name' => 'accesskey_mailbox_XXXXXXXXXXXXXXXXXXXXXXX',
116// 'caption' => _("XXXXXXXXXXXXXXX"),
117// 'type' => SMOPT_TYPE_STRLIST,
118// 'refresh' => SMOPT_REFRESH_NONE,
119// 'posvals' => $my_a_to_z,
120// );
121
122
8949acd6 123 /*** Load the Access Key Options for the Read Message page into the array ***/
124 $optgrps[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE] = _("Access Keys For Read Message Screen");
125 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE] = array();
126
127 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
128 'name' => 'accesskey_read_msg_reply',
129 'caption' => _("Reply"),
130 'type' => SMOPT_TYPE_STRLIST,
131 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 132 'posvals' => $my_a_to_z,
133 );
134
135 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
136 'name' => 'accesskey_read_msg_reply_all',
137 'caption' => _("Reply All"),
138 'type' => SMOPT_TYPE_STRLIST,
139 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 140 'posvals' => $my_a_to_z,
141 );
142
143 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
144 'name' => 'accesskey_read_msg_forward',
145 'caption' => _("Forward"),
146 'type' => SMOPT_TYPE_STRLIST,
147 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 148 'posvals' => $my_a_to_z,
149 );
150
151 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
152 'name' => 'accesskey_read_msg_as_attach',
153 'caption' => _("As Attachment"),
154 'type' => SMOPT_TYPE_STRLIST,
155 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 156 'posvals' => $my_a_to_z,
157 );
158
159 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
160 'name' => 'accesskey_read_msg_delete',
161 'caption' => _("Delete"),
162 'type' => SMOPT_TYPE_STRLIST,
163 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 164 'posvals' => $my_a_to_z,
165 );
166
167 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
168 'name' => 'accesskey_read_msg_bypass_trash',
169 'caption' => _("Bypass Trash"),
170 'type' => SMOPT_TYPE_STRLIST,
171 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 172 'posvals' => $my_a_to_z,
173 );
174
175 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
176 'name' => 'accesskey_read_msg_move_to',
177 'caption' => _("Move To"),
178 'type' => SMOPT_TYPE_STRLIST,
179 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 180 'posvals' => $my_a_to_z,
181 );
182
183 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
184 'name' => 'accesskey_read_msg_move',
185 'caption' => _("Move"),
186 'type' => SMOPT_TYPE_STRLIST,
187 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 188 'posvals' => $my_a_to_z,
189 );
190
191 $optvals[SMOPT_GRP_ACCESSKEYS_READ_MESSAGE][] = array(
192 'name' => 'accesskey_read_msg_copy',
193 'caption' => _("Copy"),
194 'type' => SMOPT_TYPE_STRLIST,
195 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 196 'posvals' => $my_a_to_z,
197 );
198
199
200 /*** Load the Access Key Options for the Compose page into the array ***/
201 $optgrps[SMOPT_GRP_ACCESSKEYS_COMPOSE] = _("Access Keys For Compose Screen");
202 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE] = array();
203
204 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
5840b9f0 205 'name' => 'accesskey_compose_identity',
206 'caption' => _("From"),
207 'type' => SMOPT_TYPE_STRLIST,
208 'refresh' => SMOPT_REFRESH_NONE,
209 'posvals' => $my_a_to_z,
210 );
211
212 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
8949acd6 213 'name' => 'accesskey_compose_to',
214 'caption' => _("To"),
215 'type' => SMOPT_TYPE_STRLIST,
216 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 217 'posvals' => $my_a_to_z,
218 );
219
220 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
221 'name' => 'accesskey_compose_cc',
222 'caption' => _("Cc"),
223 'type' => SMOPT_TYPE_STRLIST,
224 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 225 'posvals' => $my_a_to_z,
226 );
227
228 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
229 'name' => 'accesskey_compose_bcc',
230 'caption' => _("Bcc"),
231 'type' => SMOPT_TYPE_STRLIST,
232 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 233 'posvals' => $my_a_to_z,
234 );
235
236 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
237 'name' => 'accesskey_compose_subject',
238 'caption' => _("Subject"),
239 'type' => SMOPT_TYPE_STRLIST,
240 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 241 'posvals' => $my_a_to_z,
242 );
243
244 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
245 'name' => 'accesskey_compose_priority',
246 'caption' => _("Priority"),
247 'type' => SMOPT_TYPE_STRLIST,
248 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 249 'posvals' => $my_a_to_z,
250 );
251
252 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
253 'name' => 'accesskey_compose_on_read',
254 'caption' => _("On Read"),
255 'type' => SMOPT_TYPE_STRLIST,
256 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 257 'posvals' => $my_a_to_z,
258 );
259
260 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
261 'name' => 'accesskey_compose_on_delivery',
262 'caption' => _("On Delivery"),
263 'type' => SMOPT_TYPE_STRLIST,
264 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 265 'posvals' => $my_a_to_z,
266 );
267
268 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
269 'name' => 'accesskey_compose_signature',
270 'caption' => _("Signature"),
271 'type' => SMOPT_TYPE_STRLIST,
272 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 273 'posvals' => $my_a_to_z,
274 );
275
276 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
277 'name' => 'accesskey_compose_addresses',
278 'caption' => _("Addresses"),
279 'type' => SMOPT_TYPE_STRLIST,
280 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 281 'posvals' => $my_a_to_z,
282 );
283
284 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
285 'name' => 'accesskey_compose_save_draft',
286 'caption' => _("Save Draft"),
287 'type' => SMOPT_TYPE_STRLIST,
288 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 289 'posvals' => $my_a_to_z,
290 );
291
292 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
293 'name' => 'accesskey_compose_send',
294 'caption' => _("Send"),
295 'type' => SMOPT_TYPE_STRLIST,
296 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 297 'posvals' => $my_a_to_z,
298 );
299
300 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
301 'name' => 'accesskey_compose_body',
302 'caption' => _("Body"),
303 'type' => SMOPT_TYPE_STRLIST,
304 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 305 'posvals' => $my_a_to_z,
306 );
307
308 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
309 'name' => 'accesskey_compose_attach_browse',
310 'caption' => _("Browse"),
311 'type' => SMOPT_TYPE_STRLIST,
312 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 313 'posvals' => $my_a_to_z,
314 );
315
316 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
317 'name' => 'accesskey_compose_attach',
318 'caption' => _("Attach"),
319 'type' => SMOPT_TYPE_STRLIST,
320 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 321 'posvals' => $my_a_to_z,
322 );
323
324 $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
325 'name' => 'accesskey_compose_delete_attach',
326 'caption' => _("Delete Selected Attachments"),
327 'type' => SMOPT_TYPE_STRLIST,
328 'refresh' => SMOPT_REFRESH_NONE,
8949acd6 329 'posvals' => $my_a_to_z,
330 );
331
332
f99c4469 333 /*** Load the Access Key Options for the Folder List page into the array ***/
334 $optgrps[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST] = _("Access Keys For Folder List Screen");
335 $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST] = array();
336
337 $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
338 'name' => 'accesskey_folders_refresh',
339 'caption' => _("Refresh/Check Mail"),
340 'type' => SMOPT_TYPE_STRLIST,
341 'refresh' => SMOPT_REFRESH_NONE,
342 'posvals' => $my_a_to_z,
343 );
344
345 $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
346 'name' => 'accesskey_folders_purge_trash',
347 'caption' => _("Purge Trash"),
348 'type' => SMOPT_TYPE_STRLIST,
349 'refresh' => SMOPT_REFRESH_NONE,
350 'posvals' => $my_a_to_z,
351 );
352
353 $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
354 'name' => 'accesskey_folders_inbox',
355 'caption' => _("INBOX"),
356 'type' => SMOPT_TYPE_STRLIST,
357 'refresh' => SMOPT_REFRESH_NONE,
358 'posvals' => $my_a_to_z,
359 );
360
361
362 /*** Load the Access Key Options for the main Options page into the array ***/
363 $optgrps[SMOPT_GRP_ACCESSKEYS_OPTIONS] = _("Access Keys For Options Screen");
364 $optvals[SMOPT_GRP_ACCESSKEYS_OPTIONS] = array();
365
366//FIXME -- TODO...
367// $optvals[SMOPT_GRP_ACCESSKEYS_OPTIONS][] = array(
368// 'name' => 'accesskey_options_XXXXXXXXXXXXXXXXXXXXXXX',
369// 'caption' => _("XXXXXXXXXXXXXXX"),
370// 'type' => SMOPT_TYPE_STRLIST,
371// 'refresh' => SMOPT_REFRESH_NONE,
372// 'posvals' => $my_a_to_z,
373// );
374
375
8949acd6 376 /* Assemble all this together and return it as our result. */
377 $result = array(
378 'grps' => $optgrps,
379 'vals' => $optvals
380 );
381 return ($result);
382}
383
384/******************************************************************/
385/** Define any specialized save functions for this option page. ***/
386/** ***/
387/** You must add every function that is set in save parameter ***/
388/******************************************************************/
389