mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
warn on empty subject before sending mail
This commit is contained in:
parent
5ef1bb620c
commit
aa9bcef188
@ -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('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_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_recipient',lang('No recipient address given!'));
|
||||||
|
$this->t->set_var('lang_no_subject',lang('No subject given!'));
|
||||||
$this->t->pparse("out","header");
|
$this->t->pparse("out","header");
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
awin = window.open(url,"attach","width=500,height=400,toolbar=no,resizable=yes");
|
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[]');
|
var tos = document.getElementsByName('address[]');
|
||||||
for(i=0; i < tos.length; ++i) {
|
for(i=0; i < tos.length; ++i) {
|
||||||
if (tos[i].value != '') break;
|
if (tos[i].value != '') break;
|
||||||
@ -29,12 +30,18 @@
|
|||||||
alert("{lang_no_recipient}");
|
alert("{lang_no_recipient}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// check subject
|
||||||
|
var subject = document.getElementById('fm_compose_subject');
|
||||||
|
if(subject.value == '') {
|
||||||
|
alert("{lang_no_subject}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<form method="post" name="doit" action="{link_action}" ENCTYPE="multipart/form-data" onsubmit="return check_sender();">
|
<form method="post" name="doit" action="{link_action}" ENCTYPE="multipart/form-data" onsubmit="return check_data();">
|
||||||
<input type="hidden" id="saveAsDraft" name="saveAsDraft" value="0">
|
<input type="hidden" id="saveAsDraft" name="saveAsDraft" value="0">
|
||||||
<TABLE WIDTH="100%" CELLPADDING="1" CELLSPACING="0" style="border: solid #aaaaaa 1px; border-right: solid black 1px; border-bottom: solid black 1px;">
|
<TABLE WIDTH="100%" CELLPADDING="1" CELLSPACING="0" style="border: solid #aaaaaa 1px; border-right: solid black 1px; border-bottom: solid black 1px;">
|
||||||
<tr class="navbarBackground">
|
<tr class="navbarBackground">
|
||||||
|
Loading…
Reference in New Issue
Block a user