Happy New Year
[squirrelmail.git] / plugins / squirrelspell / modules / options_main.mod
index fe4688406b837f2127c831a1aced3462da2b67c4..bfed60dbd11d07c9a87247b78061548d2ae524b1 100644 (file)
@@ -8,15 +8,21 @@
  * Default page called when accessing SquirrelSpell's options.
  *
  * @author Konstantin Riabitsev <icon at duke.edu>
- * @copyright 1999-2016 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage squirrelspell
  */
 
-global $SQSPELL_APP;
-$msg = '<p>'
+global $SQSPELL_APP, $main_options_changed_message;
+
+if (!empty($main_options_changed_message))
+   $msg = $main_options_changed_message;
+else
+   $msg = '';
+
+$msg .= '<p>'
   . _("Please choose which options you wish to set up:")
   . '</p>'
   . '<ul>'
@@ -46,6 +52,27 @@ if (function_exists("mcrypt_generic")) {
     . '</li>';
 }
 $msg .= "</ul>\n";
+
+
+
+// add checkbox to enable/disable the spellcheck button on compose screen
+//
+$sqspell_show_button = getPref($data_dir, $username, 'sqspell_show_button', 1);
+$msg .= '<form method="post">'
+  . '<input type="hidden" name="MOD" value="change_main_options" />'
+  . '<input type="hidden" name="smtoken" value="' . sm_generate_security_token() . '" />'
+  . '<p>'
+  . '<input type="checkbox" id="sqspell_show_button" name="sqspell_show_button" value="1"';
+if ($sqspell_show_button) {
+  $msg .= ' checked="checked"';
+}
+$msg .= ' /><label for="sqspell_show_button"> '
+     . sprintf(_("Show \"%s\" button when composing"), _("Check Spelling"))
+     . "</label>\n";
+$msg .= " <input type=\"submit\" value=\" "
+  . _("Make these changes") . " \" /></p></form>";
+
+
 sqspell_makePage( _("SquirrelSpell Options Menu"), null, $msg);
 
 /**