Skip to content

Commit

Permalink
Use [email protected] as sender for suspension notification. Remo…
Browse files Browse the repository at this point in the history
…ve hint for no unsubscribe option. Add missing file for gallery update.
  • Loading branch information
thisismeonmounteverest committed Oct 22, 2023
1 parent 7c82bf6 commit 818853a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/Command/SendMassmailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ private function determineSender($type): Address
case 'TermsOfUse':
$sender = new Address('[email protected]', 'BeWelcome');
break;
case Newsletter::SUSPENSION_NOTIFICATION:
$sender = new Address('[email protected]', 'BeWelcome');
break;
default:
$sender = new Address('[email protected]', 'BeWelcome');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Newsletter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Newsletter implements ObjectManagerAware
public const REGULAR_NEWSLETTER = 'Normal';
public const SPECIFIC_NEWSLETTER = 'Specific';
public const TERMS_OF_USE = 'TermsOfUse';

public const SUSPENSION_NOTIFICATION = 'SuspendAfter5Reminders';
/**
* @var Member
*
Expand Down
12 changes: 8 additions & 4 deletions src/Form/GalleryUploadForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\NotBlank;

class GalleryUploadForm extends AbstractType
{
Expand All @@ -16,11 +18,13 @@ class GalleryUploadForm extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('albums', Select2Type::class, [
->add('albums', TextType::class, [
'label' => 'gallery.upload_to_album',
'choices' => $options['albums'],
'choice_translation_domain' => false,
'searchbox' => false,
'autocomplete' => true,
'required' => false,
'autocomplete_choices' => $options['albums'],
'allow_options_create' => true,
'max_items' => 1,
])
->add('files', FileType::class, [
'label' => 'files',
Expand Down
5 changes: 2 additions & 3 deletions templates/emails/newsletter.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</wrapper>

<container class="secondary">

<spacer size="16"></spacer>

{% if has_images is defined %}
Expand All @@ -21,7 +20,7 @@
</columns>
</row>
{% endif %}

<row>
<columns>
{{ wordcode|trans({'gender': receiver.gender, 'username': receiver.username})|prepare_newsletter }}
Expand All @@ -39,6 +38,7 @@
<a href="{{ url('local_newsletter_unsubscribe', {'username': receiver.username, 'unsubscribeKey': unsubscribe_key }) }}">{{ 'newsletter.local.unsubscribe'|trans }}</a>
{% elseif constant('\\App\\Entity\\Newsletter::REGULAR_NEWSLETTER') == newsletter.type %}
<a href="{{ url('regular_newsletter_unsubscribe', {'username': receiver.username, 'unsubscribeKey': unsubscribe_key }) }}">{{ 'newsletter.regular.unsubscribe'|trans }}</a>
{% elseif constant('\\App\\Entity\\Newsletter::SUSPENSION_NOTIFICATION') == newsletter.type %}
{% else %}
{{ 'newsletter.no.unsubscribe'|trans }}
{% endif %}
Expand All @@ -48,7 +48,6 @@
</columns>
</row>
</wrapper>

</container>
{% endapply %}
{% endblock %}

0 comments on commit 818853a

Please sign in to comment.