Adding basic per instance mailing configuration.
This commit is contained in:
parent
f8cb8cd05a
commit
04f39ebc19
5 changed files with 104 additions and 8 deletions
|
|
@ -5,6 +5,7 @@ use warnings;
|
|||
use Class::C3;
|
||||
|
||||
use WebGUI::Macro;
|
||||
use Tie::IxHash;
|
||||
|
||||
##----------------------------------------------------------------------------
|
||||
#sub configureMailingForm {
|
||||
|
|
@ -62,6 +63,33 @@ sub getIssueList {
|
|||
return;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub getSubject {
|
||||
my $self = shift;
|
||||
my $configuration = shift || {};
|
||||
|
||||
return $configuration->{ subject } || '(No subject)';
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub getMailingProperties {
|
||||
my $self = shift;
|
||||
tie my %properties, 'Tie::IxHash', (
|
||||
subject => {
|
||||
fieldType => 'text',
|
||||
label => 'subject',
|
||||
},
|
||||
styleTemplateId => {
|
||||
fieldType => 'template',
|
||||
label => 'Style template',
|
||||
defaultValue=> $self->get('mailStyleTemplateId'),
|
||||
namespace => 'style',
|
||||
},
|
||||
);
|
||||
|
||||
return \%properties;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub getRecipients {
|
||||
WebGUI::Error::OverrideMe->throw;
|
||||
|
|
@ -70,9 +98,11 @@ sub getRecipients {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
sub processContentAsUser {
|
||||
my $self = shift;
|
||||
my $issueId = shift;
|
||||
my $userId = shift;
|
||||
my $self = shift;
|
||||
my $issueId = shift;
|
||||
my $userId = shift;
|
||||
my $configuration = shift || {};
|
||||
|
||||
my $session = $self->session;
|
||||
my $currentUser = $session->user;
|
||||
|
||||
|
|
@ -81,7 +111,8 @@ sub processContentAsUser {
|
|||
$session->log->preventDebugOutput;
|
||||
|
||||
my $styleTemplateId =
|
||||
$self->get('mailStyleTemplateId')
|
||||
$configuration->{ styleTemplateId }
|
||||
|| $self->get('mailStyleTemplateId')
|
||||
|| $self->get('styleTemplateId');
|
||||
|
||||
# Generate email body for this user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue