Replaced some hardcoded messages for i18n'ed ones.
This commit is contained in:
parent
2490e166d3
commit
d5079fb2b5
3 changed files with 29 additions and 8 deletions
|
|
@ -424,7 +424,9 @@ sub unsubscribe {
|
|||
#----------------------------------------------------------------------------
|
||||
sub www_confirmMutation {
|
||||
my $self = shift;
|
||||
my ($form, $db) = $self->session->quick( 'form', 'db' );
|
||||
my $session = $self->session;
|
||||
my $i18n = WebGUI::International->new( $session, 'AssetAspect_Subscriber' );
|
||||
my ($form, $db) = $session->quick( 'form', 'db' );
|
||||
|
||||
my $code = $form->get('code');
|
||||
return unless $code;
|
||||
|
|
@ -438,20 +440,20 @@ sub www_confirmMutation {
|
|||
);
|
||||
|
||||
if ( $userId ) {
|
||||
$self->logConfirmation( $code );
|
||||
|
||||
if ( $type eq 'subscribe' ) {
|
||||
$self->getSubscriptionGroup->addUsers( [ $userId ] );
|
||||
return $self->processStyle( sprintf $i18n->get( 'subscription successful'), $self->getUrl );
|
||||
}
|
||||
elsif ( $type eq 'unsubscribe' ) {
|
||||
$self->getSubscriptionGroup->deleteUsers( [ $userId ] );
|
||||
return $self->processStyle( sprintf $i18n->get( 'unsubscription successful' ), $self->getUrl );
|
||||
}
|
||||
|
||||
$self->logConfirmation( $code );
|
||||
}
|
||||
else {
|
||||
return $self->processStyle( 'Verkeerde code' );
|
||||
}
|
||||
|
||||
return $self->processStyle( 'U bent aangemeld voor deze nieuwsbrief' );
|
||||
return $self->processStyle( $i18n->get( 'wrong code' ) );
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue