From: znek Date: Fri, 22 Jul 2005 11:18:39 +0000 (+0000) Subject: added validation of recipients, SOGo bug #1220. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=184add5acf1d49e2a10bbff58125d536a513281b;p=scalable-opengroupware.org added validation of recipients, SOGo bug #1220. git-svn-id: http://svn.opengroupware.org/SOGo/trunk@890 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/WebServerResources/ChangeLog b/SOGo/UI/WebServerResources/ChangeLog index b44f8c29..aa9a5156 100644 --- a/SOGo/UI/WebServerResources/ChangeLog +++ b/SOGo/UI/WebServerResources/ChangeLog @@ -1,5 +1,7 @@ 2005-07-22 Marcus Mueller + * mailer.js: added validation of recipients + * layout2or3_xlib.js: added (currently used by UIxMailToEditor for height calculation) diff --git a/SOGo/UI/WebServerResources/mailer.js b/SOGo/UI/WebServerResources/mailer.js index 4ec09040..f4a6693f 100644 --- a/SOGo/UI/WebServerResources/mailer.js +++ b/SOGo/UI/WebServerResources/mailer.js @@ -100,6 +100,9 @@ function validateEditorInput(sender) { field = document.pageform.subject; if (field.value == "") errortext = errortext + "Missing Subject\n"; + + if (!UIxRecipientSelectorHasRecipients()) + errortext = errortext + "Missing Recipients\n"; if (errortext.length > 0) { alert("validation failed:\n" + errortext); @@ -112,13 +115,6 @@ function clickedEditorSend(sender) { if (!validateEditorInput(sender)) return false; - // TODO: validate whether we have a recipient! (#1220) - /* - if (!UIxRecipientSelectorHasRecipients()) { - alert("do not have any recipients?!"); - return false; - } - */ document.pageform.action="send"; document.pageform.submit(); // if everything is ok, close the window