Happy 2017
[squirrelmail.git] / templates / default_advanced / compose_body.tpl
index 372dd0b3a914a8fb56207a863604bc183faf09e6..c3e0fadb599bd101b45cd4af9d691aa2e3df6577 100644 (file)
@@ -5,10 +5,12 @@
  * Description
  * 
  * The following variables are available in this template:
+ *    $accesskey_compose_body - The access key to use for the message body textarea
+ *    $accesskey_compose_send - The access key to be use for the Send button
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2017 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @version $Id: compose_body.tpl 11743 2006-09-27 21:54:14Z stevetruckstuff $
+ * @version $Id$
  * @package squirrelmail
  * @subpackage templates
  */
@@ -24,13 +26,13 @@ extract($t);
 <table cellspacing="0" class="table1">
  <tr>
   <td style="text-align: center">
-   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php echo $input_onfocus; ?>><?php echo $body; ?></textarea>
+   <textarea name="body" id="body" rows="<?php echo $editor_height; ?>" cols="<?php echo $editor_width; ?>" <?php if ($accesskey_compose_body != 'NONE') echo 'accesskey="' . $accesskey_compose_body . '" '; echo $input_onfocus; ?>><?php echo $body; ?></textarea>
 
 <?php if (checkForJavascript()) // Display text area resizing handle
 
     // FIXME: There should be a better way (probably best to be javascript only, although trying to avoid unnecessary js) to calculate resize_handle width to match $editor_width 
     //$_total_width_ = 700;
-    echo '<div class="resize_handle" ' /* style="width: ' . ($editor_width * 8.3) . 'px; margin-left: ' . (($_total_width_ - ($editor_width * 8.3)) / 2) . 'px;" */ . 'onmousedown="startVertResizeDrag(event, document.forms[0].body, 40, 9000, this);"></div>';
+    echo '<div class="resize_handle" ' /* style="width: ' . ($editor_width * 8.3) . 'px; margin-left: ' . (($_total_width_ - ($editor_width * 8.3)) / 2) . 'px;" */ . 'onmousedown="startVertResizeDrag(event, document.compose.body, 40, 9000, this);"></div>';
 
 ?>
 
@@ -41,7 +43,7 @@ extract($t);
         ?>
  <tr>
   <td class="bottomSend">
-   <input type="submit" name="send" value="<?php echo _("Send"); ?>" />
+   <input type="submit" <?php if (!unique_widget_name('send', TRUE) && $accesskey_compose_send != 'NONE') echo 'accesskey="' . $accesskey_compose_send . '" '; ?>name="<?php echo unique_widget_name('send'); ?>" value="<?php echo _("Send"); ?>" />
   </td>
  </tr>
         <?php
@@ -49,3 +51,4 @@ extract($t);
  ?>
 </table>
 </div>
+<input type="hidden" name="send_button_count" value="<?php echo unique_widget_name('send', TRUE); ?>" />