diff --git a/felamimail/inc/class.uicompose.inc.php b/felamimail/inc/class.uicompose.inc.php index 9b3f5c9be4..2d3fdf60d0 100644 --- a/felamimail/inc/class.uicompose.inc.php +++ b/felamimail/inc/class.uicompose.inc.php @@ -234,6 +234,7 @@ $this->t->set_var('infologImage',$GLOBALS['egw']->html->image('felamimail','to_infolog',lang('Save as infolog'),'width="17px" height="17px" valign="middle"' )); $this->t->set_var('lang_save_as_infolog',lang('Save as infolog')); $this->t->set_var('lang_no_recipient',lang('No recipient address given!')); + $this->t->set_var('lang_no_subject',lang('No subject given!')); $this->t->pparse("out","header"); diff --git a/felamimail/templates/default/composeForm.tpl b/felamimail/templates/default/composeForm.tpl index 7955decc39..7b1551c233 100644 --- a/felamimail/templates/default/composeForm.tpl +++ b/felamimail/templates/default/composeForm.tpl @@ -19,8 +19,9 @@ awin = window.open(url,"attach","width=500,height=400,toolbar=no,resizable=yes"); } - function check_sender() + function check_data() { + // check recipient(s) var tos = document.getElementsByName('address[]'); for(i=0; i < tos.length; ++i) { if (tos[i].value != '') break; @@ -29,12 +30,18 @@ alert("{lang_no_recipient}"); return false; } + // check subject + var subject = document.getElementById('fm_compose_subject'); + if(subject.value == '') { + alert("{lang_no_subject}"); + return false; + } return true; }
-
+