Skip to content

Commit

Permalink
#17 add a skip option for Mailings
Browse files Browse the repository at this point in the history
This should avoid log spamming for mailings if needed
  • Loading branch information
pbatroff committed May 30, 2024
1 parent 41a079d commit 7f14083
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CRM/Mailingtools/Form/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ public function buildQuickForm() {
'mailing_debugging_body',
E::ts('Print full Email Body to Log file')
);
$this->add(
'checkbox',
'mailing_debugging_omit_mailings',
E::ts('Omit Logging for Mailings')
);

// load contacts
$this->renderContact($current_values, 'link');
Expand Down Expand Up @@ -371,6 +376,7 @@ protected function getSettingsInForm() {
'mailing_debugging_header',
'mailing_debugging_recipients',
'mailing_debugging_body',
'mailing_debugging_omit_mailings',
);
}

Expand Down
5 changes: 4 additions & 1 deletion templates/CRM/Mailingtools/Form/Settings.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,8 @@
<p>{ts domain="de.systopia.mailingtools"}Logs a JSON encoded List of all recipients to mailling.log{/ts}</p>
{/htxt}
{htxt id="id-mailing_debugging_body"}
<p>{ts domain="de.systopia.mailingtools"}Logs the FULL{/ts}</p>
<p>{ts domain="de.systopia.mailingtools"}Logs the FULL Body of the Mail. Careful, this can create considerable data in the logging file.{/ts}</p>
{/htxt}
{htxt id="id-mailing_debugging_omit_mailings"}
<p>{ts domain="de.systopia.mailingtools"}Omits logging for mailing.{/ts}</p>
{/htxt}
5 changes: 5 additions & 0 deletions templates/CRM/Mailingtools/Form/Settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@
<div class="content">{$form.mailing_debugging_body.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.mailing_debugging_omit_mailings.label} <a onclick='CRM.help("{ts domain='de.systopia.mailingtools'}Omit Logging for Mailings{/ts}", {literal}{"id":"id-mailing_debugging_omit_mailings","file":"CRM\/Mailingtools\/Form\/Settings"}{/literal}); return false;' href="#" title="{ts domain='de.systopia.mailingtools'}Help{/ts}" class="helpicon">&nbsp;</a></div>
<div class="content">{$form.mailing_debugging_omit_mailings.html}</div>
<div class="clear"></div>
</div>
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
Expand Down

0 comments on commit 7f14083

Please sign in to comment.