Browse Source

Gihub issue #1888 Do not send announcement if you hit enter in the subject field.

Jan Derriks 7 years ago
parent
commit
6650352834
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/announcements/announcements.php

+ 1 - 1
main/announcements/announcements.php

@@ -485,7 +485,7 @@ switch ($action) {
 
         $defaults['email_ann'] = true;
 
-        $form->addElement('text', 'title', get_lang('EmailTitle'));
+        $form->addElement('text', 'title', get_lang('EmailTitle'),  array( "onkeypress" => "return event.keyCode != 13;") ); //do not submit on enter
         $form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
         $form->addElement('hidden', 'id');
         $htmlTags = "<b>".get_lang('Tags')."</b><br /><br />";