diff --git a/Assets/img/triggerdialog.png b/Assets/img/printmailing.png similarity index 100% rename from Assets/img/triggerdialog.png rename to Assets/img/printmailing.png diff --git a/Assets/js/triggerdialog.js b/Assets/js/printmailing.js similarity index 95% rename from Assets/js/triggerdialog.js rename to Assets/js/printmailing.js index 4180c9c..2d3cd31 100644 --- a/Assets/js/triggerdialog.js +++ b/Assets/js/printmailing.js @@ -1,4 +1,4 @@ -Mautic.triggerdialogOnLoad = function (container) { +Mautic.printmailingOnLoad = function (container) { var prefix = 'trigger_campaign'; var parent = mQuery('.dynamic-content-variable, .dwc-variable'); if (parent.length) { @@ -8,7 +8,7 @@ Mautic.triggerdialogOnLoad = function (container) { if (mQuery('#' + prefix + '_variables').length) { mQuery('#available_variables').on('change', function () { if (mQuery(this).val()) { - Mautic.addTriggerDialogVariable(mQuery(this).val(), mQuery('option:selected', this).data('field-object')); + Mautic.addPrintmailingVariable(mQuery(this).val(), mQuery('option:selected', this).data('field-object')); mQuery(this).val(''); mQuery(this).trigger('chosen:updated'); } @@ -111,7 +111,7 @@ Mautic.reorderTriggerCampaignVariables = function () { mQuery('#' + prefix + '_variables .panel-heading').first().addClass('hide'); }; -Mautic.addTriggerDialogVariable = function (elId, elObj) { +Mautic.addPrintmailingVariable = function (elId, elObj) { var variableId = '#available_' + elObj + '_' + elId, variableOption = mQuery(variableId), label = variableOption.text(), @@ -169,4 +169,4 @@ Mautic.addTriggerDialogVariable = function (elId, elObj) { var variable = mQuery('#' + variableIdBase + 'variable'); variable.attr('type', fieldType); -}; \ No newline at end of file +}; diff --git a/Config/config.php b/Config/config.php index 99598bf..38c3819 100644 --- a/Config/config.php +++ b/Config/config.php @@ -1,33 +1,33 @@ 'Print Mailing DPAG Integration by Leuchtfeuer', 'description' => 'Send postcards or letters via Print Mailing', - 'version' => '4.2.2', + 'version' => '5.0.0', 'author' => 'Leuchtfeuer Digital Marketing GmbH', 'menu' => [ 'main' => [ - 'plugin.triggerdialog.menu.index' => [ - 'route' => 'mautic_triggerdialog_index', + 'plugin.printmailing.menu.index' => [ + 'route' => 'mautic_printmailing_index', 'parent' => 'mautic.core.channels', 'access' => [ - 'triggerdialog:campaigns:view', + 'printmailing:campaigns:view', ], 'checks' => [ 'integration' => [ - 'Triggerdialog' => [ + 'Printmailing' => [ 'enabled' => true, ], ], @@ -39,21 +39,21 @@ 'routes' => [ 'main' => [ - 'mautic_triggerdialog_index' => [ + 'mautic_printmailing_index' => [ 'path' => '/triggertemplates/{page}', - 'controller' => 'MauticTriggerdialogBundle:TriggerCampaign:index', + 'controller' => 'LeuchtfeuerPrintmailingBundle:TriggerCampaign:index', ], - 'mautic_triggerdialog_action' => [ + 'mautic_printmailing_action' => [ 'path' => '/triggertemplates/{objectAction}/{objectId}', - 'controller' => 'MauticTriggerdialogBundle:TriggerCampaign:execute', + 'controller' => 'LeuchtfeuerPrintmailingBundle:TriggerCampaign:execute', ], ], ], 'services' => [ 'integrations' => [ - 'mautic.integration.triggerdialog' => [ - 'class' => TriggerdialogIntegration::class, + 'mautic.integration.printmailing' => [ + 'class' => PrintmailingIntegration::class, 'arguments' => [ 'event_dispatcher', 'mautic.helper.cache_storage', @@ -75,23 +75,23 @@ ], ], 'events' => [ - 'mautic.triggerdialog.config.subscriber' => [ + 'mautic.printmailing.config.subscriber' => [ 'class' => ConfigSubscriber::class, ], - 'mautic.triggerdialog.campaign.subscriber' => [ + 'mautic.printmailing.campaign.subscriber' => [ 'class' => CampaignSubscriber::class, 'arguments' => [ 'mautic.helper.core_parameters', 'mautic.helper.ip_lookup', 'mautic.core.model.auditlog', - 'mautic.triggerdialog.model.campaign', + 'mautic.printmailing.model.campaign', ], ], ], 'forms' => [ - 'mautic.form.type.triggerdialogconfig' => [ + 'mautic.form.type.printmailingconfig' => [ 'class' => ConfigType::class, - 'alias' => 'triggerdialogconfig', + 'alias' => 'printmailingconfig', ], 'mautic.form.type.trigger_campaign' => [ 'class' => TriggerCampaignType::class, @@ -109,17 +109,17 @@ 'class' => ActionType::class, 'alias' => 'trigger_action', 'arguments' => [ - 'mautic.triggerdialog.model.campaign', + 'mautic.printmailing.model.campaign', ], ], ], 'models' => [ - 'mautic.triggerdialog.model.campaign' => [ + 'mautic.printmailing.model.campaign' => [ 'class' => TriggerCampaignModel::class, ], ], 'utilities' => [ - 'mautic.triggerdialog.utility.sso' => [ + 'mautic.printmailing.utility.sso' => [ 'class' => SingleSignOnUtility::class, 'alias' => 'sso_utility', 'arguments' => [ @@ -131,11 +131,11 @@ ], 'parameters' => [ - 'triggerdialog_masClientId' => ClientIdGenerator::generateClientId(), - 'triggerdialog_masSecret' => null, - 'triggerdialog_masId' => null, - 'triggerdialog_rest_user' => null, - 'triggerdialog_rest_password' => null, - 'triggerdialog_contract_email' => 'print-mailing@deutschepost.de', + 'printmailing_masClientId' => ClientIdGenerator::generateClientId(), + 'printmailing_masSecret' => null, + 'printmailing_masId' => null, + 'printmailing_rest_user' => null, + 'printmailing_rest_password' => null, + 'printmailing_contract_email' => 'print-mailing@deutschepost.de', ], ]; diff --git a/Controller/TriggerCampaignController.php b/Controller/TriggerCampaignController.php index 0fce6f7..100dd4c 100644 --- a/Controller/TriggerCampaignController.php +++ b/Controller/TriggerCampaignController.php @@ -1,14 +1,14 @@ 'triggerdialog:campaigns:create', - 'delete' => 'triggerdialog:campaigns:delete', - 'edit' => 'triggerdialog:campaigns:edit', - 'publish' => 'triggerdialog:campaigns:publish', - 'view' => 'triggerdialog:campaigns:view', + 'create' => 'printmailing:campaigns:create', + 'delete' => 'printmailing:campaigns:delete', + 'edit' => 'printmailing:campaigns:edit', + 'publish' => 'printmailing:campaigns:publish', + 'view' => 'printmailing:campaigns:view', ]; public const ROUTES = [ - 'action' => 'mautic_triggerdialog_action', - 'index' => 'mautic_triggerdialog_index', + 'action' => 'mautic_printmailing_action', + 'index' => 'mautic_printmailing_index', ]; public const SESSION_VARS = [ - 'limit' => 'plugin.triggerdialog.limit', - 'orderBy' => 'plugin.triggerdialog.orderby', - 'orderByDir' => 'plugin.triggerdialog.orderbydir', - 'page' => 'plugin.triggerdialog.page', - 'search' => 'plugin.triggerdialog.search', + 'limit' => 'plugin.printmailing.limit', + 'orderBy' => 'plugin.printmailing.orderby', + 'orderByDir' => 'plugin.printmailing.orderbydir', + 'page' => 'plugin.printmailing.page', + 'search' => 'plugin.printmailing.search', ]; public const THEMES = [ - 'variables' => 'MauticTriggerdialogBundle:FormTheme\Variables', + 'variables' => 'LeuchtfeuerPrintmailingBundle:FormTheme\Variables', ]; public const TEMPLATES = [ - 'form' => 'MauticTriggerdialogBundle:TriggerCampaign:form.html.php', - 'index' => 'MauticTriggerdialogBundle:TriggerCampaign:index', - 'list' => 'MauticTriggerdialogBundle:TriggerCampaign:list.html.php', + 'form' => 'LeuchtfeuerPrintmailingBundle:TriggerCampaign:form.html.php', + 'index' => 'LeuchtfeuerPrintmailingBundle:TriggerCampaign:index', + 'list' => 'LeuchtfeuerPrintmailingBundle:TriggerCampaign:list.html.php', ]; - public const ACTIVE_LINK = '#mautic_triggerdialog_index'; + public const ACTIVE_LINK = '#mautic_printmailing_index'; - public const MAUTIC_CONTENT = 'triggerdialog'; + public const MAUTIC_CONTENT = 'printmailing'; protected $session; @@ -213,7 +213,7 @@ public function editAction($objectId, $ignorePost = false, $clone = false) 'flashes' => [ [ 'type' => 'error', - 'msg' => 'plugin.triggerdialog.campaign.error.notfound', + 'msg' => 'plugin.printmailing.campaign.error.notfound', 'msgVars' => ['%id%' => $objectId], ], ], @@ -301,11 +301,11 @@ protected function getPermissions() */ protected function checkConfiguration(CoreParametersHelper $coreParametersHelper) { - if (!$coreParametersHelper->has('triggerdialog_rest_user') || empty($coreParametersHelper->get('triggerdialog_rest_user'))) { + if (!$coreParametersHelper->has('printmailing_rest_user') || empty($coreParametersHelper->get('printmailing_rest_user'))) { return false; } - if (!$coreParametersHelper->has('triggerdialog_rest_password') || empty($coreParametersHelper->get('triggerdialog_rest_password'))) { + if (!$coreParametersHelper->has('printmailing_rest_password') || empty($coreParametersHelper->get('printmailing_rest_password'))) { return false; } @@ -597,7 +597,7 @@ protected function deleteMultipleCampaigns($postActionVars, &$flashes) if (null === $triggerCampaign) { $flashes[] = [ 'type' => 'error', - 'msg' => 'plugin.triggerdialog.campaign.error.notfound', + 'msg' => 'plugin.printmailing.campaign.error.notfound', 'msgVars' => ['%id%' => $triggerCampaignId], ]; } elseif (!$this->get('mautic.security')->hasEntityAccess(true, self::PERMISSIONS['delete'], $triggerCampaign->getCreatedBy())) { @@ -615,7 +615,7 @@ protected function deleteMultipleCampaigns($postActionVars, &$flashes) $flashes[] = [ 'type' => 'notice', - 'msg' => 'plugin.triggerdialog.campaign.notice.batch_deleted', + 'msg' => 'plugin.printmailing.campaign.notice.batch_deleted', 'msgVars' => [ '%count%' => count($triggerCampaigns), ], @@ -639,7 +639,7 @@ protected function deleteSingleCampaign($objectId, $postActionVars, &$flashes) if (null === $triggerCampaign) { $flashes[] = [ 'type' => 'error', - 'msg' => 'plugin.triggerdialog.campaign.error.notfound', + 'msg' => 'plugin.printmailing.campaign.error.notfound', 'msgVars' => ['%id%' => $objectId], ]; } elseif (!$this->get('mautic.security')->hasEntityAccess(true, self::PERMISSIONS['delete'], $triggerCampaign->getCreatedBy())) { diff --git a/Entity/TriggerCampaign.php b/Entity/TriggerCampaign.php index 29d828c..9089682 100644 --- a/Entity/TriggerCampaign.php +++ b/Entity/TriggerCampaign.php @@ -1,12 +1,12 @@ 'plugin.triggerdialog.form.types.string', - 'integer' => 'plugin.triggerdialog.form.types.integer', - 'boolean' => 'plugin.triggerdialog.form.types.boolean', - 'date' => 'plugin.triggerdialog.form.types.date', - 'image' => 'plugin.triggerdialog.form.types.image', - 'imageurl' => 'plugin.triggerdialog.form.types.imageurl', - 'float' => 'plugin.triggerdialog.form.types.float', - 'zip' => 'plugin.triggerdialog.form.types.zip', - 'countrycode' => 'plugin.triggerdialog.form.types.countrycode', + 'string' => 'plugin.printmailing.form.types.string', + 'integer' => 'plugin.printmailing.form.types.integer', + 'boolean' => 'plugin.printmailing.form.types.boolean', + 'date' => 'plugin.printmailing.form.types.date', + 'image' => 'plugin.printmailing.form.types.image', + 'imageurl' => 'plugin.printmailing.form.types.imageurl', + 'float' => 'plugin.printmailing.form.types.float', + 'zip' => 'plugin.printmailing.form.types.zip', + 'countrycode' => 'plugin.printmailing.form.types.countrycode', ]; private $id; diff --git a/Entity/TriggerCampaignRepository.php b/Entity/TriggerCampaignRepository.php index e8be7f5..6d44427 100644 --- a/Entity/TriggerCampaignRepository.php +++ b/Entity/TriggerCampaignRepository.php @@ -1,6 +1,6 @@ ['onCampaignBuild', 0], - TriggerdialogEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0], - TriggerdialogEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0], - TriggerdialogEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0], - TriggerdialogEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0], + PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0], ]; } public function onCampaignBuild(CampaignBuilderEvent $event): void { $event->addAction( - 'plugin.triggerdialog.campaign', + 'plugin.printmailing.campaign', [ - 'eventName' => TriggerdialogEvents::ON_CAMPAIGN_TRIGGER_ACTION, - 'label' => 'plugin.triggerdialog.campaign.label', - 'description' => 'plugin.triggerdialog.campaign.description', + 'eventName' => PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION, + 'label' => 'plugin.printmailing.campaign.label', + 'description' => 'plugin.printmailing.campaign.description', 'formType' => ActionType::class, ] ); @@ -78,7 +78,7 @@ public function onCampaignBuild(CampaignBuilderEvent $event): void /** * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \MauticPlugin\MauticTriggerdialogBundle\Exception\RequestException + * @throws \MauticPlugin\LeuchtfeuerPrintmailingBundle\Exception\RequestException */ public function onTriggerCampaignPreSave(TriggerCampaignEvent $event): void { @@ -90,10 +90,10 @@ public function onTriggerCampaignPreSave(TriggerCampaignEvent $event): void $triggerCampaign->setPrintNodeDescription('DESC_'.$printNodeId); } elseif ($changes = $event->getChanges()) { if (isset($changes['name']) || isset($changes['startDate'])) { - $this->getTriggerDialogService()->updateCampaign($triggerCampaign); + $this->getPrintmailingService()->updateCampaign($triggerCampaign); } if (isset($changes['variables'])) { - $this->getTriggerDialogService()->updateCampaignVariable($triggerCampaign, $changes['variables'][1]); + $this->getPrintmailingService()->updateCampaignVariable($triggerCampaign, $changes['variables'][1]); } } } @@ -103,13 +103,13 @@ public function onTriggerCampaignPostSave(TriggerCampaignEvent $event): void $triggerCampaign = $event->getTriggerCampaign(); if (isset($triggerCampaign->getChanges()['printNodeId'])) { - $triggerCampaign = $this->getTriggerDialogService()->createCampaign($triggerCampaign); + $triggerCampaign = $this->getPrintmailingService()->createCampaign($triggerCampaign); $this->triggerCampaignModel->getRepository()->saveEntity($triggerCampaign); } if ($details = $event->getChanges()) { $this->auditLogModel->writeToLog([ - 'bundle' => 'triggerdialog', + 'bundle' => 'printmailing', 'object' => TriggerCampaignModel::NAME, 'objectId' => $event->getTriggercampaign()->getId(), 'details' => $details, @@ -125,7 +125,7 @@ public function onTriggerCampaignPreDelete(TriggerCampaignEvent $event): void public function onCampaignTriggerAction(CampaignExecutionEvent $event) { - if (false === $event->checkContext('plugin.triggerdialog.campaign')) { + if (false === $event->checkContext('plugin.printmailing.campaign')) { return; } @@ -146,26 +146,26 @@ public function onCampaignTriggerAction(CampaignExecutionEvent $event) try { $lead = $event->getLead(); $this->auditLogModel->writeToLog([ - 'bundle' => 'triggerdialog', + 'bundle' => 'printmailing', 'object' => 'lead', 'objectId' => $lead->getId(), 'action' => 'registered for campaign', 'details' => $event->getEventSettings(), 'ipAddress' => $this->ipLookupHelper->getIpAddressFromRequest(), ]); - $this->getTriggerDialogService()->createRecipient($triggerCampaign, $lead); + $this->getPrintmailingService()->createRecipient($triggerCampaign, $lead); $event->setResult(true); } catch (\Exception $exception) { $event->setFailed($exception->getMessage()); } } - protected function getTriggerDialogService(): TriggerdialogService + protected function getPrintmailingService(): PrintmailingService { - return TriggerdialogService::makeInstance( - (int) $this->coreParametersHelper->get('triggerdialog_masId'), - $this->coreParametersHelper->get('triggerdialog_masClientId'), - $this->coreParametersHelper->get('triggerdialog_rest_password') + return PrintmailingService::makeInstance( + (int) $this->coreParametersHelper->get('printmailing_masId'), + $this->coreParametersHelper->get('printmailing_masClientId'), + $this->coreParametersHelper->get('printmailing_rest_password') ); } } diff --git a/EventListener/ConfigSubscriber.php b/EventListener/ConfigSubscriber.php index 1bac6ca..b6d9181 100644 --- a/EventListener/ConfigSubscriber.php +++ b/EventListener/ConfigSubscriber.php @@ -1,10 +1,10 @@ addForm([ - 'bundle' => 'MauticTriggerdialogBundle', + 'bundle' => 'LeuchtfeuerPrintmailingBundle', 'formType' => ConfigType::class, - 'formAlias' => 'triggerdialogconfig', - 'formTheme' => 'MauticTriggerdialogBundle:FormTheme\Config', - 'parameters' => $event->getParametersFromConfig('MauticTriggerdialogBundle'), + 'formAlias' => 'printmailingconfig', + 'formTheme' => 'LeuchtfeuerPrintmailingBundle:FormTheme\Config', + 'parameters' => $event->getParametersFromConfig('LeuchtfeuerPrintmailingBundle'), ]); } } diff --git a/Exception/RequestException.php b/Exception/RequestException.php index b8561d5..f33d860 100644 --- a/Exception/RequestException.php +++ b/Exception/RequestException.php @@ -1,6 +1,6 @@ add('trigger_campaign', ChoiceType::class, [ 'choices' => array_flip($this->fieldChoices), - 'label' => 'plugin.triggerdialog.campaign.formlabel', + 'label' => 'plugin.printmailing.campaign.formlabel', 'label_attr' => ['class' => 'control-label'], 'required' => true, 'multiple' => false, diff --git a/Form/Type/ConfigType.php b/Form/Type/ConfigType.php index 8fcf6a7..55c1ac1 100644 --- a/Form/Type/ConfigType.php +++ b/Form/Type/ConfigType.php @@ -1,6 +1,6 @@ add('triggerdialog_masId', IntegerType::class, [ - 'label' => 'plugin.triggerdialog.form.masId', + $builder->add('printmailing_masId', IntegerType::class, [ + 'label' => 'plugin.printmailing.form.masId', 'label_attr' => [ 'class' => 'control-label', ], @@ -27,8 +27,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], ]); - $builder->add('triggerdialog_masClientId', TextType::class, [ - 'label' => 'plugin.triggerdialog.form.masClientId', + $builder->add('printmailing_masClientId', TextType::class, [ + 'label' => 'plugin.printmailing.form.masClientId', 'label_attr' => [ 'class' => 'control-label', ], @@ -40,8 +40,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], ]); - $builder->add('triggerdialog_masSecret', PasswordType::class, [ - 'label' => 'plugin.triggerdialog.form.masSecret', + $builder->add('printmailing_masSecret', PasswordType::class, [ + 'label' => 'plugin.printmailing.form.masSecret', 'label_attr' => [ 'class' => 'control-label', ], @@ -52,8 +52,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], ]); - $builder->add('triggerdialog_rest_user', TextType::class, [ - 'label' => 'plugin.triggerdialog.form.rest.user', + $builder->add('printmailing_rest_user', TextType::class, [ + 'label' => 'plugin.printmailing.form.rest.user', 'label_attr' => [ 'class' => 'control-label', ], @@ -64,8 +64,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ], ]); - $builder->add('triggerdialog_rest_password', PasswordType::class, [ - 'label' => 'plugin.triggerdialog.form.rest.password', + $builder->add('printmailing_rest_password', PasswordType::class, [ + 'label' => 'plugin.printmailing.form.rest.password', 'label_attr' => [ 'class' => 'control-label', ], @@ -83,6 +83,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void */ public function getName(): string { - return 'triggerdialogconfig'; + return 'printmailingconfig'; } } diff --git a/Form/Type/TriggerCampaignType.php b/Form/Type/TriggerCampaignType.php index ec8caab..b17957d 100644 --- a/Form/Type/TriggerCampaignType.php +++ b/Form/Type/TriggerCampaignType.php @@ -1,6 +1,6 @@ em->getRepository('MauticTriggerdialogBundle:TriggerCampaign'); + return $this->em->getRepository('LeuchtfeuerPrintmailingBundle:TriggerCampaign'); } /** @@ -30,7 +30,7 @@ public function getRepository() */ public function getPermissionBase() { - return 'triggerdialog:campaigns'; + return 'printmailing:campaigns'; } /** @@ -77,16 +77,16 @@ protected function dispatchEvent($action, &$entity, $isNew = false, Event $event switch ($action) { case 'pre_save': - $name = TriggerdialogEvents::TRIGGER_CAMPAIGN_PRE_SAVE; + $name = PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE; break; case 'post_save': - $name = TriggerdialogEvents::TRIGGER_CAMPAIGN_POST_SAVE; + $name = PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE; break; case 'pre_delete': - $name = TriggerdialogEvents::TRIGGER_CAMPAIGN_PRE_DELETE; + $name = PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE; break; case 'post_delete': - $name = TriggerdialogEvents::TRIGGER_CAMPAIGN_POST_DELETE; + $name = PrintmailingEvents::TRIGGER_CAMPAIGN_POST_DELETE; break; default: return null; diff --git a/TriggerdialogEvents.php b/PrintmailingEvents.php similarity index 57% rename from TriggerdialogEvents.php rename to PrintmailingEvents.php index 55eddfd..0f9b4d8 100644 --- a/TriggerdialogEvents.php +++ b/PrintmailingEvents.php @@ -1,13 +1,13 @@ /plugins/MauticTriggerdialogBundle` - -* Clear cache, typically: +* Download plugin "mautic-deutschepost" from [Github](https://ma.leuchtfeuer.com/asset/6:as051-`printmailing`-mautic-integration) (as ZIP archive) to the Mautic-Server + +* Unpack the file, rename the directory and move it to the plugin directory of the Mautic installation + `mv mautic-deutschepost-master /plugins/LeuchtfeuerPrintmailingBundle` + +* Clear cache, typically: `sudo -u www-data php /bin/console cache:clear` - -* adjust file permissions if needed: - `chown -R www-data:www-data /plugins/MauticTriggerdialogBundle` - + +* adjust file permissions if needed: + `chown -R www-data:www-data /plugins/LeuchtfeuerPrintmailingBundle` + * Go to "Settings" -> "Plugins" in the Mautic-Backend, klick on "Install/Update Plugins" - + * "Dt. Post" is now in the Plugin list, and is already activated - + The following configuration is easy: You can make all necessary settings under _"Settings" -> "Configuration" -> "Print Mailing Settings"_. * MAS ID (technical name is _"partnerSystemIdExt"_) - identifies the remote system (i.e. Deutsche Post) - + * _"Mandanten-ID"_ - identifies your own System. IMPORTANT: You need to submit this ID to Deutsche Post, or else you will not have access! - + * _"Prod JWT Secret"_ - allows for Single Sign-On from Mautic into Deutsche Post - + * _User_ und password (_"Authentication Secret"_) - required for data transfer from your system to Deutsche Post - + ![](https://www.leuchtfeuer.com/fileadmin/knowledge/Mautic/td/TD-Mautic-Config.png) @@ -57,7 +57,7 @@ Now it gets exciting: In "_Channels" -> "Print Mailing"_, click on the blue butt If you arrive there - in the "yellow surface" - and see your name in the top right corner, everything worked! -![](https://www.leuchtfeuer.com/fileadmin/knowledge/Mautic/td/TD-Manager-Button.png) +![](https://www.leuchtfeuer.com/fileadmin/knowledge/Mautic/td/TD-Manager-Button.png) ![](https://www.leuchtfeuer.com/fileadmin/_processed_/0/7/csm_TD-SSO_5e0671e54c.png) ## Usage @@ -92,10 +92,10 @@ Again, just like with email, you can now select from your existing templates - i Mautic then uses the plugin to send the data to Deutsche Post for printing and delivery - and shortly afterwards your contact has his individual postcard in his mailbox. ## Contributing -You can contribute by making a **pull request** to the master branch of +You can contribute by making a **pull request** to the master branch of this repository. Or just send us some **beers**... ### Author Leuchtfeuer Digital Marketing GmbH -mautic@Leuchtfeuer.com \ No newline at end of file +mautic@Leuchtfeuer.com diff --git a/Security/Permissions/TriggerdialogPermissions.php b/Security/Permissions/PrintmailingPermissions.php similarity index 80% rename from Security/Permissions/TriggerdialogPermissions.php rename to Security/Permissions/PrintmailingPermissions.php index 55f9c9f..f66f7b5 100644 --- a/Security/Permissions/TriggerdialogPermissions.php +++ b/Security/Permissions/PrintmailingPermissions.php @@ -1,11 +1,11 @@ '123', - 'triggerdialog_masClientId' => 'masClientId', - 'triggerdialog_masSecret' => 'masSecret', - 'triggerdialog_rest_user' => 'rest_user', - 'triggerdialog_rest_password' => 'rest_password', + 'printmailing_masId' => '123', + 'printmailing_masClientId' => 'masClientId', + 'printmailing_masSecret' => 'masSecret', + 'printmailing_rest_user' => 'rest_user', + 'printmailing_rest_password' => 'rest_password', ]; $form = $this->factory->create(ConfigType::class, $dataToForm); $view = $form->createView(); - self::assertSame('123', $view->children['triggerdialog_masId']->vars['value']); - self::assertSame('masClientId', $view->children['triggerdialog_masClientId']->vars['value']); - self::assertSame('', $view->children['triggerdialog_masSecret']->vars['value']); - self::assertSame('rest_user', $view->children['triggerdialog_rest_user']->vars['value']); - self::assertSame('', $view->children['triggerdialog_rest_password']->vars['value']); + self::assertSame('123', $view->children['printmailing_masId']->vars['value']); + self::assertSame('masClientId', $view->children['printmailing_masClientId']->vars['value']); + self::assertSame('', $view->children['printmailing_masSecret']->vars['value']); + self::assertSame('rest_user', $view->children['printmailing_rest_user']->vars['value']); + self::assertSame('', $view->children['printmailing_rest_password']->vars['value']); } public function testFieldsAreSaved(): void { $dataToForm = [ - 'triggerdialog_masId' => '123', - 'triggerdialog_masClientId' => 'masClientId', - 'triggerdialog_masSecret' => 'masSecret', - 'triggerdialog_rest_user' => 'rest_user', - 'triggerdialog_rest_password' => 'rest_password', + 'printmailing_masId' => '123', + 'printmailing_masClientId' => 'masClientId', + 'printmailing_masSecret' => 'masSecret', + 'printmailing_rest_user' => 'rest_user', + 'printmailing_rest_password' => 'rest_password', ]; $form = $this->factory->create(ConfigType::class, $dataToForm); $formData = [ - 'triggerdialog_masId' => '321', - 'triggerdialog_masClientId' => 'masClientId_1', - 'triggerdialog_masSecret' => 'masSecret_1', - 'triggerdialog_rest_user' => 'rest_user_1', - 'triggerdialog_rest_password' => 'rest_password_1', + 'printmailing_masId' => '321', + 'printmailing_masClientId' => 'masClientId_1', + 'printmailing_masSecret' => 'masSecret_1', + 'printmailing_rest_user' => 'rest_user_1', + 'printmailing_rest_password' => 'rest_password_1', ]; $form->submit($formData); - $formData['triggerdialog_masId'] = (int) $formData['triggerdialog_masId']; + $formData['printmailing_masId'] = (int) $formData['printmailing_masId']; self::assertTrue($form->isSynchronized()); diff --git a/Translations/de_DE/messages.ini b/Translations/de_DE/messages.ini index c69dac1..706a88b 100644 --- a/Translations/de_DE/messages.ini +++ b/Translations/de_DE/messages.ini @@ -1,53 +1,53 @@ -plugin.triggerdialog.form.masClientId = "MAS Client-ID [Mandanten-ID]" -plugin.triggerdialog.form.masId = "Marketing Automation System (MAS) ID [partnerSystemIdExt]" -plugin.triggerdialog.form.email = E-Mail Adresse -plugin.triggerdialog.form.masSecret = Prod JWT Secret -plugin.triggerdialog.form.rest.user = "User [Benutzername]" -plugin.triggerdialog.form.rest.password = Authentication Secret -plugin.triggerdialog.form.contract.help = "Um individuelle Print Mailings aus Kampagnen zu versenden, musst du zunächst einen Vertrag mit der Deutschen Post abschließen." -plugin.triggerdialog.form.contract.request = "Vertrag anfordern" -plugin.triggerdialog.form.contract.email = "Guten Tag,\\r\\n\\r\\nich interessiere mich für die Nutzung von Ihrer Print Mailing Lösung zusammen mit meinem Marketing Automation Tool. Bitte senden Sie mir einen entsprechenden Vertrag.\\r\\n\\r\\nMAS ID [partnerSystemIdExt]:%masId%\\r\\nMAS Client-ID [Mandanten-ID]: %masClientId%\\r\\n\\r\\nVielen Dank.\\r\\n\\r\\nMit freundlichen Grüßen" -plugin.triggerdialog.form.contract.subject = "Neuer Vertrag Print Mailing: %masId%" -plugin.triggerdialog.form.details.link = "https://www.leuchtfeuer.com/en/mautic-know-how/mautic/mautic-postcards-deutschepost-plugin-triggerdialog/" - -plugin.triggerdialog.form.tab.details = Details -plugin.triggerdialog.form.tab.variables = Daten Mapping -plugin.triggerdialog.form.tab.variables.hint = "Die Angabe von genau einer Variable vom Datentyp 'zip' ist obligatorisch. Die Variable muss die Postleitzahl des Empfängers enthalten.
Wenn für die Kampagne internationale Artikel unterstützt werden sollen, musst du genau eine Variable vom Datentyp 'countryCode' wählen." -plugin.triggerdialog.open.triggerdialog = Print Mailing Manager -plugin.triggerdialog.entity_id = Print Mailing - -mautic.config.tab.triggerdialogconfig = Print Mailing Einstellungen -mautic.config.tab.triggerdialogconfig.rest = REST API - -plugin.triggerdialog.menu.index = Print Mailing -plugin.triggerdialog.menu.root = Print Mailing Templates -plugin.triggerdialog.menu.edit = Print Mailing Template bearbeiten -plugin.triggerdialog.menu.new = Neues Print Mailing Template - -plugin.triggerdialog.campaign.label = Via Print Mailing senden -plugin.triggerdialog.campaign.description = Postkarte oder Brief via Print Mailing senden -plugin.triggerdialog.campaign.formlabel = Print Mailing Template - -plugin.triggerdialog.campaign.notice.batch_deleted = Mehrere Print Mailing Templates gelöscht -plugin.triggerdialog.campaign.error.notfound = Print Mailing Template nicht gefunden -plugin.triggerdialog.campaign.error.cannot.delete.batch = Kann mehrere Print Mailing Templates nicht löschen - -mautic.triggerdialog.form.confirmdelete = Willst du dieses Print Mailing Template löschen? - -plugin.triggerdialog.plugin.name = Print Mailing -plugin.triggerdialog.config.invalid = Deine Konfiguration scheint ungültig zu sein. Bitte überprüfe deinen %link%. - - -mautic.triggerdialog.permissions.header = Print Mailing Berechtigungen -mautic.triggerdialog.permissions.campaigns = Print Mailing Template Berechtigungen - - -plugin.triggerdialog.form.types.string = Text -plugin.triggerdialog.form.types.integer = Ganzzahl -plugin.triggerdialog.form.types.boolean = Wahr/Falsch -plugin.triggerdialog.form.types.date = Datum -plugin.triggerdialog.form.types.image = Bild -plugin.triggerdialog.form.types.imageurl = Bild URL -plugin.triggerdialog.form.types.float = Kommazahl -plugin.triggerdialog.form.types.zip = PLZ -plugin.triggerdialog.form.types.countrycode = Länder Code \ No newline at end of file +plugin.printmailing.form.masClientId = "MAS Client-ID [Mandanten-ID]" +plugin.printmailing.form.masId = "Marketing Automation System (MAS) ID [partnerSystemIdExt]" +plugin.printmailing.form.email = E-Mail Adresse +plugin.printmailing.form.masSecret = Prod JWT Secret +plugin.printmailing.form.rest.user = "User [Benutzername]" +plugin.printmailing.form.rest.password = Authentication Secret +plugin.printmailing.form.contract.help = "Um individuelle Print Mailings aus Kampagnen zu versenden, musst du zunächst einen Vertrag mit der Deutschen Post abschließen." +plugin.printmailing.form.contract.request = "Vertrag anfordern" +plugin.printmailing.form.contract.email = "Guten Tag,\\r\\n\\r\\nich interessiere mich für die Nutzung von Ihrer Print Mailing Lösung zusammen mit meinem Marketing Automation Tool. Bitte senden Sie mir einen entsprechenden Vertrag.\\r\\n\\r\\nMAS ID [partnerSystemIdExt]:%masId%\\r\\nMAS Client-ID [Mandanten-ID]: %masClientId%\\r\\n\\r\\nVielen Dank.\\r\\n\\r\\nMit freundlichen Grüßen" +plugin.printmailing.form.contract.subject = "Neuer Vertrag Print Mailing: %masId%" +plugin.printmailing.form.details.link = "https://www.leuchtfeuer.com/mautic/know-how/mautic-print-mailing-automation/" + +plugin.printmailing.form.tab.details = Details +plugin.printmailing.form.tab.variables = Daten Mapping +plugin.printmailing.form.tab.variables.hint = "Die Angabe von genau einer Variable vom Datentyp 'zip' ist obligatorisch. Die Variable muss die Postleitzahl des Empfängers enthalten.
Wenn für die Kampagne internationale Artikel unterstützt werden sollen, musst du genau eine Variable vom Datentyp 'countryCode' wählen." +plugin.printmailing.open.printmailing = Print Mailing Manager +plugin.printmailing.entity_id = Print Mailing + +mautic.config.tab.printmailingconfig = Print Mailing Einstellungen +mautic.config.tab.printmailingconfig.rest = REST API + +plugin.printmailing.menu.index = Print Mailing +plugin.printmailing.menu.root = Print Mailing Templates +plugin.printmailing.menu.edit = Print Mailing Template bearbeiten +plugin.printmailing.menu.new = Neues Print Mailing Template + +plugin.printmailing.campaign.label = Via Print Mailing senden +plugin.printmailing.campaign.description = Postkarte oder Brief via Print Mailing senden +plugin.printmailing.campaign.formlabel = Print Mailing Template + +plugin.printmailing.campaign.notice.batch_deleted = Mehrere Print Mailing Templates gelöscht +plugin.printmailing.campaign.error.notfound = Print Mailing Template nicht gefunden +plugin.printmailing.campaign.error.cannot.delete.batch = Kann mehrere Print Mailing Templates nicht löschen + +mautic.printmailing.form.confirmdelete = Willst du dieses Print Mailing Template löschen? + +plugin.printmailing.plugin.name = Print Mailing +plugin.printmailing.config.invalid = Deine Konfiguration scheint ungültig zu sein. Bitte überprüfe deinen %link%. + + +mautic.printmailing.permissions.header = Print Mailing Berechtigungen +mautic.printmailing.permissions.campaigns = Print Mailing Template Berechtigungen + + +plugin.printmailing.form.types.string = Text +plugin.printmailing.form.types.integer = Ganzzahl +plugin.printmailing.form.types.boolean = Wahr/Falsch +plugin.printmailing.form.types.date = Datum +plugin.printmailing.form.types.image = Bild +plugin.printmailing.form.types.imageurl = Bild URL +plugin.printmailing.form.types.float = Kommazahl +plugin.printmailing.form.types.zip = PLZ +plugin.printmailing.form.types.countrycode = Länder Code diff --git a/Translations/en_US/messages.ini b/Translations/en_US/messages.ini index d777481..36455bd 100644 --- a/Translations/en_US/messages.ini +++ b/Translations/en_US/messages.ini @@ -1,54 +1,54 @@ -plugin.triggerdialog.form.masClientId = "MAS Client-ID [Mandanten-ID]" -plugin.triggerdialog.form.masId = "Marketing Automation System (MAS) ID [partnerSystemIdExt]" -plugin.triggerdialog.form.email = Email Address -plugin.triggerdialog.form.masSecret = Prod JWT Secret -plugin.triggerdialog.form.rest.user = "User [Benutzername]" -plugin.triggerdialog.form.rest.password = Authentication Secret -plugin.triggerdialog.form.contract.help = "To send individual print mailings from campaigns, you must have a contract with Deutsche Post first." -plugin.triggerdialog.form.contract.request = "Request contract" -plugin.triggerdialog.form.contract.email = "Guten Tag,\\r\\n\\r\\ich interessiere mich für die Nutzung von Ihrer PrintMailing Lösung zusammen mit meinem Marketing Automation Tool. Bitte senden Sie mir einen entsprechenden Vertrag.\\r\\n\\r\\nMAS ID [partnerSystemIdExt]:%masId%\\r\\nMAS Client-ID [Mandanten-ID]: %masClientId%\\r\\n\\r\\nVielen Dank.\\r\\n\\r\\nMit freundlichen Grüßen" -plugin.triggerdialog.form.contract.subject = "Neuer Vertrag PrintMailing: %masId%" -plugin.triggerdialog.form.details.link = "https://www.leuchtfeuer.com/en/mautic-know-how/mautic/mautic-postcards-deutschepost-plugin-triggerdialog/" - -plugin.triggerdialog.form.tab.details = Details -plugin.triggerdialog.form.tab.variables = Data Mapping -plugin.triggerdialog.form.tab.variables.hint = "The specification of exactly one variable of the data type 'zip' is mandatory. The variable must contain the postal code for the recipient.
If international items are to be supported for the campaign, exactly one variable of the data type 'countryCode' must be chosen." -plugin.triggerdialog.open.triggerdialog = Print Mailing Manager -plugin.triggerdialog.entity_id = Print Mailing - -mautic.config.tab.triggerdialogconfig = Print Mailing Settings -mautic.config.tab.triggerdialogconfig.rest = REST API - -plugin.triggerdialog.menu.index = Print Mailing -plugin.triggerdialog.menu.root = Print Mailing Templates -plugin.triggerdialog.menu.edit = Edit Print Mailing Template -plugin.triggerdialog.menu.new = New Print Mailing Template - -plugin.triggerdialog.campaign.label = Send via Print Mailing -plugin.triggerdialog.campaign.description = Send postcard or letter via Print Mailing -plugin.triggerdialog.campaign.formlabel = Print Mailing Template - -plugin.triggerdialog.campaign.notice.batch_deleted = Deleted multiple Print Mailing templates -plugin.triggerdialog.campaign.error.notfound = Print Mailing template not found -plugin.triggerdialog.campaign.error.cannot.delete.batch = Cannot delete multiple Print Mailing templates - -mautic.triggerdialog.form.confirmdelete = Do you want to delete this Print Mailing template? - -plugin.triggerdialog.plugin.name = Print Mailing -plugin.triggerdialog.config.invalid = Your configuration seems to be invalid. Please check your %link%. - - -mautic.triggerdialog.permissions.header = Print Mailing Permissions -mautic.triggerdialog.permissions.campaigns = Print Mailing Template Permissions - - -plugin.triggerdialog.form.types.string = String -plugin.triggerdialog.form.types.integer = Integer -plugin.triggerdialog.form.types.boolean = Boolean -plugin.triggerdialog.form.types.date = Date -plugin.triggerdialog.form.types.image = Image -plugin.triggerdialog.form.types.imageurl = Image URL -plugin.triggerdialog.form.types.float = Float -plugin.triggerdialog.form.types.zip = ZIP -plugin.triggerdialog.form.types.countrycode = Country Code +plugin.printmailing.form.masClientId = "MAS Client-ID [Mandanten-ID]" +plugin.printmailing.form.masId = "Marketing Automation System (MAS) ID [partnerSystemIdExt]" +plugin.printmailing.form.email = Email Address +plugin.printmailing.form.masSecret = Prod JWT Secret +plugin.printmailing.form.rest.user = "User [Benutzername]" +plugin.printmailing.form.rest.password = Authentication Secret +plugin.printmailing.form.contract.help = "To send individual print mailings from campaigns, you must have a contract with Deutsche Post first." +plugin.printmailing.form.contract.request = "Request contract" +plugin.printmailing.form.contract.email = "Guten Tag,\\r\\n\\r\\ich interessiere mich für die Nutzung von Ihrer PrintMailing Lösung zusammen mit meinem Marketing Automation Tool. Bitte senden Sie mir einen entsprechenden Vertrag.\\r\\n\\r\\nMAS ID [partnerSystemIdExt]:%masId%\\r\\nMAS Client-ID [Mandanten-ID]: %masClientId%\\r\\n\\r\\nVielen Dank.\\r\\n\\r\\nMit freundlichen Grüßen" +plugin.printmailing.form.contract.subject = "Neuer Vertrag PrintMailing: %masId%" +plugin.printmailing.form.details.link = "https://www.leuchtfeuer.com/mautic/know-how/mautic-print-mailing-automation/" + +plugin.printmailing.form.tab.details = Details +plugin.printmailing.form.tab.variables = Data Mapping +plugin.printmailing.form.tab.variables.hint = "The specification of exactly one variable of the data type 'zip' is mandatory. The variable must contain the postal code for the recipient.
If international items are to be supported for the campaign, exactly one variable of the data type 'countryCode' must be chosen." +plugin.printmailing.open.printmailing = Print Mailing Manager +plugin.printmailing.entity_id = Print Mailing + +mautic.config.tab.printmailingconfig = Print Mailing Settings +mautic.config.tab.printmailingconfig.rest = REST API + +plugin.printmailing.menu.index = Print Mailing +plugin.printmailing.menu.root = Print Mailing Templates +plugin.printmailing.menu.edit = Edit Print Mailing Template +plugin.printmailing.menu.new = New Print Mailing Template + +plugin.printmailing.campaign.label = Send via Print Mailing +plugin.printmailing.campaign.description = Send postcard or letter via Print Mailing +plugin.printmailing.campaign.formlabel = Print Mailing Template + +plugin.printmailing.campaign.notice.batch_deleted = Deleted multiple Print Mailing templates +plugin.printmailing.campaign.error.notfound = Print Mailing template not found +plugin.printmailing.campaign.error.cannot.delete.batch = Cannot delete multiple Print Mailing templates + +mautic.printmailing.form.confirmdelete = Do you want to delete this Print Mailing template? + +plugin.printmailing.plugin.name = Print Mailing +plugin.printmailing.config.invalid = Your configuration seems to be invalid. Please check your %link%. + + +mautic.printmailing.permissions.header = Print Mailing Permissions +mautic.printmailing.permissions.campaigns = Print Mailing Template Permissions + + +plugin.printmailing.form.types.string = String +plugin.printmailing.form.types.integer = Integer +plugin.printmailing.form.types.boolean = Boolean +plugin.printmailing.form.types.date = Date +plugin.printmailing.form.types.image = Image +plugin.printmailing.form.types.imageurl = Image URL +plugin.printmailing.form.types.float = Float +plugin.printmailing.form.types.zip = ZIP +plugin.printmailing.form.types.countrycode = Country Code diff --git a/Utility/SingleSignOnUtility.php b/Utility/SingleSignOnUtility.php index bf616fd..e90fd8a 100644 --- a/Utility/SingleSignOnUtility.php +++ b/Utility/SingleSignOnUtility.php @@ -1,6 +1,6 @@ $this->user->getLastName(), // TODO: Validate this (required, max 50 chars) 'email' => $this->user->getEmail(), // TODO: Validate this (required, max 150 chars) 'username' => $this->user->getUsername(), // TODO: Validate this (required, max 80 chars) - 'masClientId' => $this->coreParametersHelper->get('triggerdialog_masClientId'), - 'masId' => (int) $this->coreParametersHelper->get('triggerdialog_masId'), + 'masClientId' => $this->coreParametersHelper->get('printmailing_masClientId'), + 'masId' => (int) $this->coreParametersHelper->get('printmailing_masId'), 'iss' => self::PAYLOAD_ISS, 'exp' => strtotime('+30 day', time()), 'iat' => time(), ], - $this->coreParametersHelper->get('triggerdialog_masSecret'), + $this->coreParametersHelper->get('printmailing_masSecret'), 'HS512' ); } diff --git a/Validator/AllowedCharacters.php b/Validator/AllowedCharacters.php index f611c7d..8e8c95e 100644 --- a/Validator/AllowedCharacters.php +++ b/Validator/AllowedCharacters.php @@ -1,6 +1,6 @@ children; -$message = $view['translator']->trans('plugin.triggerdialog.form.contract.email', [ - '%masId%' => $_ENV['MAUTIC_TRIGGERDIALOG_MASID'], - '%masClientId%' => $_ENV['MAUTIC_TRIGGERDIALOG_MASCLIENTID'], +$message = $view['translator']->trans('plugin.printmailing.form.contract.email', [ + '%masId%' => $_ENV['MAUTIC_PRINTMAILING_MASID'], + '%masClientId%' => $_ENV['MAUTIC_PRINTMAILING_MASCLIENTID'], ]); -$subject = $view['translator']->trans('plugin.triggerdialog.form.contract.subject', ['%masId%' => $_ENV['MAUTIC_TRIGGERDIALOG_MASID']]); +$subject = $view['translator']->trans('plugin.printmailing.form.contract.subject', ['%masId%' => $_ENV['MAUTIC_PRINTMAILING_MASID']]); ?>
-

trans('mautic.config.tab.triggerdialogconfig'); ?>

+

trans('mautic.config.tab.printmailingconfig'); ?>

- rowIfExists($fields, 'triggerdialog_masClientId'); ?> + rowIfExists($fields, 'printmailing_masClientId'); ?>
- rowIfExists($fields, 'triggerdialog_masId'); ?> + rowIfExists($fields, 'printmailing_masId'); ?>

- rowIfExists($fields, 'triggerdialog_masSecret'); ?> + rowIfExists($fields, 'printmailing_masSecret'); ?>
@@ -48,29 +48,29 @@
-

trans('mautic.config.tab.triggerdialogconfig.rest'); ?>

+

trans('mautic.config.tab.printmailingconfig.rest'); ?>

- rowIfExists($fields, 'triggerdialog_rest_user'); ?> + rowIfExists($fields, 'printmailing_rest_user'); ?>
- rowIfExists($fields, 'triggerdialog_rest_password'); ?> + rowIfExists($fields, 'printmailing_rest_password'); ?>
\ No newline at end of file + diff --git a/Views/TriggerCampaign/form.html.php b/Views/TriggerCampaign/form.html.php index 63e3362..db38a3f 100644 --- a/Views/TriggerCampaign/form.html.php +++ b/Views/TriggerCampaign/form.html.php @@ -2,8 +2,8 @@ use Mautic\CoreBundle\Templating\Engine\PhpEngine; use Mautic\LeadBundle\Entity\LeadField; -use MauticPlugin\MauticTriggerdialogBundle\Controller\TriggerCampaignController; -use MauticPlugin\MauticTriggerdialogBundle\Entity\TriggerCampaign; +use MauticPlugin\LeuchtfeuerPrintmailingBundle\Controller\TriggerCampaignController; +use MauticPlugin\LeuchtfeuerPrintmailingBundle\Entity\TriggerCampaign; use Symfony\Component\Form\FormView; /** @@ -13,7 +13,7 @@ * @var LeadField[] $fields * @var array $formFields */ -echo $view['assets']->includeScript('plugins/MauticTriggerdialogBundle/Assets/js/triggerdialog.js', 'td', 'td'); +echo $view['assets']->includeScript('plugins/LeuchtfeuerPrintmailingBundle/Assets/js/printmailing.js', 'td', 'td'); $view->extend('MauticCoreBundle:Default:content.html.php'); $view['slots']->set('mauticContent', TriggerCampaignController::MAUTIC_CONTENT); $fields = $form->vars['fields']; @@ -23,9 +23,9 @@ $variableErrors = ($view['form']->containsErrors($form['variables'])) ? 'class="text-danger"' : ''; if (!empty($id)) { - $header = $view['translator']->trans('plugin.triggerdialog.menu.edit', ['%name%' => $form->vars['data']->getName()]); + $header = $view['translator']->trans('plugin.printmailing.menu.edit', ['%name%' => $form->vars['data']->getName()]); } else { - $header = $view['translator']->trans('plugin.triggerdialog.menu.new'); + $header = $view['translator']->trans('plugin.printmailing.menu.new'); } $view['slots']->set('headerTitle', $header); @@ -39,7 +39,7 @@