diff --git a/doc/config.html b/doc/config.html index 14b9a178..6fcf1333 100755 --- a/doc/config.html +++ b/doc/config.html @@ -1664,14 +1664,15 @@ for ELCode encoding, to 2 for HTML encoding. The default is 0.
-
Suppress default = 0|1|2
+Suppress default = 0|1|2|3
This specifies the default state of the "Suppress Email notification" button on the
new message entry form. For installations where normally an email notification is
not necessary, the default can be set to 1. If an important entry is
entered, users can then uncheck the suppress box. If this value is set to 2
, the suppress box is not displayed at all, so that an email notification is
-always produced. The default is 0.
+always produced. If this value is set to 3, the email notification is
+always suppressed. The default is 0.
Resubmit default = 0|1|2
diff --git a/src/elogd.c b/src/elogd.c
index 5daa7f16..ee21fc09 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
+ Revision 1.700 2005/07/07 20:02:43 ritt
+ Added 'suppress default = 3'
+
Revision 1.699 2005/07/07 19:47:11 ritt
Tooltips only for logbooks, not groups
@@ -10232,6 +10235,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("%s\n",
loc("Suppress Email notification"));
}
+
} else {
rsprintf("%s\n", loc("Suppress Email notification"));
}
@@ -19108,6 +19112,8 @@ void submit_elog(LOGBOOK * lbs)
/*---- email notifications ----*/
suppress = atoi(getparam("suppress"));
+ if (getcfg(lbs->name, "Suppress default", str, sizeof(str)) && atoi(str) == 3)
+ suppress = 3;
/* check for mail submissions */
mail_param[0] = 0;
@@ -19116,7 +19122,8 @@ void submit_elog(LOGBOOK * lbs)
mail_to_size = 256;
if (suppress) {
- strcpy(mail_param, "?suppress=1");
+ if (suppress != 3)
+ strcpy(mail_param, "?suppress=1");
} else {
if (!(*getparam("edit_id")
&& getcfg(lbs->name, "Suppress Email on edit", str, sizeof(str))