merge of '5c693d8846aabef79f3f26fae416c99fe51bed78'

and '8bbf9c70304e5cb8320d6acb300955b814d1ff0c'

Monotone-Parent: 5c693d8846aabef79f3f26fae416c99fe51bed78
Monotone-Parent: 8bbf9c70304e5cb8320d6acb300955b814d1ff0c
Monotone-Revision: e7b38d4230f362ff9d71b2d1bfa8af9b8a2e80c6

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2012-07-24T14:08:37
This commit is contained in:
Ludovic Marcotte
2012-07-24 14:08:37 +00:00
3 changed files with 21 additions and 3 deletions
+5
View File
@@ -1,3 +1,8 @@
2012-07-24 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/UIxPreferences.js (savePreferences):
validate the email address of the sender mail and reply-to fields.
2012-07-23 Jean Raby <jraby@inverse.ca>
* debian*/sogo.logrotate:
drop distro specific log rotate scripts
@@ -167,6 +167,9 @@
"Signature" = "Signature";
"Please enter your signature below:" = "Please enter your signature below:";
"Please specify a valid sender address." = "Please specify a valid sender address.";
"Please specify a valid reply-to address." = "Please specify a valid reply-to address.";
/* Additional Parameters */
"Additional Parameters" = "Additional Parameters";
+13 -3
View File
@@ -17,6 +17,16 @@ function savePreferences(sender) {
serializeContactsCategories();
}
if (mailCustomFromEnabled && !emailRE.test($("email").value)) {
showAlertDialog(_("Please specify a valid sender address."));
sendForm = false;
}
if (!emailRE.test($("replyTo").value)) {
showAlertDialog(_("Please specify a valid reply-to address."));
sendForm = false;
}
if ($("dayStartTime")) {
var start = $("dayStartTime");
var selectedStart = parseInt(start.options[start.selectedIndex].value);
@@ -63,10 +73,10 @@ function savePreferences(sender) {
$("sieveFilters").setValue(Object.toJSON(jsonFilters));
}
saveMailAccounts();
if (sendForm)
if (sendForm) {
saveMailAccounts();
$("mainForm").submit();
}
return false;
}