add labels to make checkboxes better clickable
[squirrelmail.git] / plugins / squirrelspell / modules / lang_setup.mod
index 3fb466b746a00ed5d39f7a29c6062197b26c6343..8d02538e183b9dbf85399a91a9ef08916595f02c 100644 (file)
@@ -1,16 +1,16 @@
 <?php
+
 /**
  * lang_setup.mod
- * ---------------
- * Squirrelspell module
  *
- * Copyright (c) 1999-2005 The SquirrelMail development team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
+ * Squirrelspell module
  *
  * This module displays available dictionaries to the user and lets
  * him/her choose which ones s/he wants to check messages with.
  *
- * @author Konstantin Riabitsev <icon@duke.edu>
+ * @author Konstantin Riabitsev <icon at duke.edu>
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage squirrelspell
@@ -27,17 +27,18 @@ $msg = '<p>'
 /**
  * Present a nice listing.
  */
-$langs = sqspell_getSettings(null);
-$add = '<p>'
+$langs = sqspell_getSettings();
+$add = '<p><label for="lang_default">'
   . _("Make this dictionary my default selection:")
-  . " <select name=\"lang_default\">\n";
+  . "</label> <select name=\"lang_default\" id=\"lang_default\">\n";
 while (list($avail_lang, $junk) = each($SQSPELL_APP)){
   $msg .= "<input type=\"checkbox\" name=\"use_langs[]\" "
-    . "value=\"$avail_lang\"";
+    . "value=\"$avail_lang\" id=\"use_langs_$avail_lang\"";
   if (in_array($avail_lang, $langs)) {
     $msg .= ' checked="checked"';
   }
-  $msg .= ' /> ' . _($avail_lang) . "<br />\n";
+  $msg .= ' /> <label for="use_langs_' . $avail_lang . '">'
+    . _($avail_lang) . "</label><br />\n";
   $add .= "<option";
   if ($avail_lang==$langs[0]) {
     $add .= ' selected="selected"';
@@ -56,5 +57,3 @@ sqspell_makePage(_("Add International Dictionaries"), null, $msg);
  * End:
  * vim: syntax=php
  */
-
-?>
\ No newline at end of file