mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
* eMail: fix misbehavior regarding the unwanted sending of a mail with no subject (despite the warning was given)
This commit is contained in:
parent
c6372b0f49
commit
b86a150c97
@ -759,14 +759,28 @@ function fm_blink_currentInputField() {
|
||||
function fm_compose_sendEMail() {
|
||||
var addressTable = document.getElementById('addressRows').rows;
|
||||
var addressSet = false;
|
||||
var subjectSet = true;
|
||||
var doubleCheck = false;
|
||||
|
||||
for (i=0; i<addressTable.length; i++) {
|
||||
if(addressTable.item(i).cells[2].firstChild.value != '') {
|
||||
addressSet = true;
|
||||
}
|
||||
}
|
||||
// check subject
|
||||
var subject = document.getElementById('fm_compose_subject');
|
||||
if(subject.value == '') {
|
||||
subjectSet = false;
|
||||
}
|
||||
// check to infolog/ to tracker. Only one can be checked.
|
||||
var toinfolog = document.getElementById('to_infolog');
|
||||
var totracker = document.getElementById('to_tracker');
|
||||
if (toinfolog.checked==true && totracker.checked==true)
|
||||
{
|
||||
doubleCheck = true;
|
||||
}
|
||||
|
||||
if(addressSet == true) {
|
||||
if(addressSet == true && subjectSet == true && doubleCheck == false) {
|
||||
// if we submit the form, we do not want to execute the onunload stuff
|
||||
do_onunload=false;
|
||||
document.doit.submit();
|
||||
|
Loading…
Reference in New Issue
Block a user