Let subject default to issue title not NLC title.
This commit is contained in:
parent
eef4a92166
commit
93478c77e1
2 changed files with 19 additions and 3 deletions
|
|
@ -65,14 +65,20 @@ sub getSubject {
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
sub getMailingProperties {
|
sub getMailingProperties {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
my $mailing = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $i18n = WebGUI::International->new( $session,'AssetAspect_Mailable' );
|
my $i18n = WebGUI::International->new( $session,'AssetAspect_Mailable' );
|
||||||
|
|
||||||
|
my $issue = $mailing->getIssue
|
||||||
|
? $mailing->getIssue
|
||||||
|
: $self
|
||||||
|
;
|
||||||
|
|
||||||
tie my %properties, 'Tie::IxHash', (
|
tie my %properties, 'Tie::IxHash', (
|
||||||
subject => {
|
subject => {
|
||||||
fieldType => 'text',
|
fieldType => 'text',
|
||||||
label => $i18n->get( 'subject' ),
|
label => $i18n->get( 'subject' ),
|
||||||
defaultValue=> $self->getTitle,
|
defaultValue=> $issue->getTitle,
|
||||||
},
|
},
|
||||||
styleTemplateId => {
|
styleTemplateId => {
|
||||||
fieldType => 'template',
|
fieldType => 'template',
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,16 @@ sub getAsset {
|
||||||
return $asset;
|
return $asset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
sub getIssue {
|
||||||
|
my $self = shift;
|
||||||
|
my $session = $self->session;
|
||||||
|
|
||||||
|
my $issue = WebGUI::Asset->newByDynamicClass( $session, $self->get('issueId') );
|
||||||
|
#### TODO: error checking
|
||||||
|
return $issue;
|
||||||
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
sub getQueuedEmailIterator {
|
sub getQueuedEmailIterator {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
@ -394,7 +404,7 @@ sub www_edit {
|
||||||
value => $self->getId,
|
value => $self->getId,
|
||||||
);
|
);
|
||||||
|
|
||||||
my %fields = %{ $self->getAsset->getMailingProperties };
|
my %fields = %{ $self->getAsset->getMailingProperties( $self ) };
|
||||||
my $configuration = $self->get('configuration') || {};
|
my $configuration = $self->get('configuration') || {};
|
||||||
while ( my( $name, $properties ) = each %fields ) {
|
while ( my( $name, $properties ) = each %fields ) {
|
||||||
$properties->{ name } = $name;
|
$properties->{ name } = $name;
|
||||||
|
|
@ -549,7 +559,7 @@ sub www_editSave {
|
||||||
|
|
||||||
return $session->privilege->insufficient unless $self->admin->canManage;
|
return $session->privilege->insufficient unless $self->admin->canManage;
|
||||||
|
|
||||||
my %fields = %{ $self->getAsset->getMailingProperties };
|
my %fields = %{ $self->getAsset->getMailingProperties( $self ) };
|
||||||
my $configuration = {};
|
my $configuration = {};
|
||||||
if ( $self->admin->canOverride ) {
|
if ( $self->admin->canOverride ) {
|
||||||
while ( my( $name, $properties ) = each %fields ) {
|
while ( my( $name, $properties ) = each %fields ) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue