Add accesskey to the From drop-down too
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Mar 2009 04:04:12 +0000 (04:04 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Mar 2009 04:04:12 +0000 (04:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13444 7612ce4b-ef26-0410-bec9-ea0150e637f0

include/load_prefs.php
include/options/accessibility.php
templates/default/compose_header.tpl

index 4b2957637733a07a97ca6f46976b786d6db0dba7..e43a6c681bc457a6c4845dd7787a5386c297e397 100644 (file)
@@ -363,6 +363,7 @@ $accesskey_read_msg_move_to = getPref($data_dir, $username, 'accesskey_read_msg_
 $accesskey_read_msg_move = getPref($data_dir, $username, 'accesskey_read_msg_move', 'm');
 $accesskey_read_msg_copy = getPref($data_dir, $username, 'accesskey_read_msg_copy', 'c');
 
 $accesskey_read_msg_move = getPref($data_dir, $username, 'accesskey_read_msg_move', 'm');
 $accesskey_read_msg_copy = getPref($data_dir, $username, 'accesskey_read_msg_copy', 'c');
 
+$accesskey_compose_identity = getPref($data_dir, $username, 'accesskey_compose_identity', 'f');
 $accesskey_compose_to = getPref($data_dir, $username, 'accesskey_compose_to', 't');
 $accesskey_compose_cc = getPref($data_dir, $username, 'accesskey_compose_cc', 'c');
 $accesskey_compose_bcc = getPref($data_dir, $username, 'accesskey_compose_bcc', 'o');
 $accesskey_compose_to = getPref($data_dir, $username, 'accesskey_compose_to', 't');
 $accesskey_compose_cc = getPref($data_dir, $username, 'accesskey_compose_cc', 'c');
 $accesskey_compose_bcc = getPref($data_dir, $username, 'accesskey_compose_bcc', 'o');
index b84f71ef7920b3d200de34b6e21a5b1a115d6e2d..70bdf1ac1424498448988475773718a5277d47f7 100644 (file)
@@ -50,7 +50,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Reply"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Reply"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -59,7 +58,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Reply All"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Reply All"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -68,7 +66,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Forward"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Forward"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -77,7 +74,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("As Attachment"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("As Attachment"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -86,7 +82,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Delete"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Delete"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -95,7 +90,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Bypass Trash"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Bypass Trash"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -104,7 +98,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Move To"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Move To"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -113,7 +106,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Move"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Move"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -122,7 +114,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Copy"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Copy"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -131,12 +122,19 @@ function load_optpage_data_accessibility() {
     $optgrps[SMOPT_GRP_ACCESSKEYS_COMPOSE] = _("Access Keys For Compose Screen");
     $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE] = array();
 
     $optgrps[SMOPT_GRP_ACCESSKEYS_COMPOSE] = _("Access Keys For Compose Screen");
     $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE] = array();
 
+    $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
+        'name'    => 'accesskey_compose_identity',
+        'caption' => _("From"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
     $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
         'name'    => 'accesskey_compose_to',
         'caption' => _("To"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
     $optvals[SMOPT_GRP_ACCESSKEYS_COMPOSE][] = array(
         'name'    => 'accesskey_compose_to',
         'caption' => _("To"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -145,7 +143,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Cc"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Cc"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -154,7 +151,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Bcc"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Bcc"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -163,7 +159,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Subject"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Subject"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -172,7 +167,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Priority"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Priority"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -181,7 +175,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("On Read"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("On Read"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -190,7 +183,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("On Delivery"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("On Delivery"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -199,7 +191,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Signature"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Signature"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -208,7 +199,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Addresses"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Addresses"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -217,7 +207,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Save Draft"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Save Draft"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -226,7 +215,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Send"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Send"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -235,7 +223,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Body"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Body"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -244,7 +231,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Browse"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Browse"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -253,7 +239,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Attach"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Attach"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
@@ -262,7 +247,6 @@ function load_optpage_data_accessibility() {
         'caption' => _("Delete Selected Attachments"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
         'caption' => _("Delete Selected Attachments"),
         'type'    => SMOPT_TYPE_STRLIST,
         'refresh' => SMOPT_REFRESH_NONE,
-        'size'    => SMOPT_SIZE_TINY,
         'posvals' => $my_a_to_z,
     );
 
         'posvals' => $my_a_to_z,
     );
 
index 1c07b703ce332f0982e30c9618fd17b2e7165b04..9f957b965114b5287d0dab57c73096f763b9066d 100644 (file)
@@ -5,10 +5,11 @@
  * Description
  * 
  * The following variables are available in this template:
  * Description
  * 
  * The following variables are available in this template:
- *    $accesskey_compose_to      - The access key to be used for the To field
- *    $accesskey_compose_cc      - The access key to be used for the Cc field
- *    $accesskey_compose_bcc     - The access key to be used for the Bcc field
- *    $accesskey_compose_subject - The access key to be used for the Subject field
+ *    $accesskey_compose_identity - The access key to be used for the From field
+ *    $accesskey_compose_to       - The access key to be used for the To field
+ *    $accesskey_compose_cc       - The access key to be used for the Cc field
+ *    $accesskey_compose_bcc      - The access key to be used for the Bcc field
+ *    $accesskey_compose_subject  - The access key to be used for the Subject field
  *
  * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  *
  * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -35,7 +36,7 @@ extract($t);
    <label for="identity"><?php echo _("From"); ?>:</label>
   </td>
   <td class="fieldValue">
    <label for="identity"><?php echo _("From"); ?>:</label>
   </td>
   <td class="fieldValue">
-   <select name="identity" id="identity">
+   <select name="identity" <?php if ($accesskey_compose_identity != 'NONE') echo 'accesskey="' . $accesskey_compose_identity . '" '; ?>id="identity">
         <?php
         foreach ($identities as $id=>$ident) {
             echo '<option value="'.$id.'"'. ($identity_def==$id ? ' selected="selected"' : '') .'>'. $ident .'</option>';
         <?php
         foreach ($identities as $id=>$ident) {
             echo '<option value="'.$id.'"'. ($identity_def==$id ? ' selected="selected"' : '') .'>'. $ident .'</option>';