mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 14:28:45 +01:00
* eMail: fix problem regarding lost control/warning when no recipient and/or no subject is provided on submit
This commit is contained in:
parent
49707b5e92
commit
02d1a00493
@ -796,30 +796,9 @@ function fm_blink_currentInputField() {
|
||||
}
|
||||
|
||||
function fm_compose_sendEMail() {
|
||||
var addressTable = document.getElementById('addressRows').rows;
|
||||
var addressSet = false;
|
||||
var subjectSet = true;
|
||||
var doubleCheck = false;
|
||||
justClickedSend = true;
|
||||
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 != null && toinfolog.checked==true) && (totracker != null && totracker.checked==true))
|
||||
{
|
||||
doubleCheck = true;
|
||||
}
|
||||
|
||||
if(addressSet == true && subjectSet == true && doubleCheck == false) {
|
||||
|
||||
if(check_data()) {
|
||||
// if we submit the form, we do not want to execute the onunload stuff
|
||||
justSavedAsDraftManually = false;
|
||||
document.getElementById('saveAsDraft').value=0;
|
||||
|
@ -27,8 +27,9 @@
|
||||
{
|
||||
// check recipient(s)
|
||||
var tos = document.getElementsByName('address[]');
|
||||
var dests = document.getElementsByName('destination[]');
|
||||
for(i=0; i < tos.length; ++i) {
|
||||
if (tos[i].value != '') break;
|
||||
if (dests[i].value != 'replyto' && tos[i].value != '') break;
|
||||
}
|
||||
if (i >= tos.length) {
|
||||
alert("{lang_no_recipient}");
|
||||
|
Loading…
Reference in New Issue
Block a user