1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

feat(cta): remove usage of cta template

This commit is contained in:
Christy Jacob 2021-07-27 19:29:41 +05:30
parent 20a11c6759
commit d97a4df9db
2 changed files with 3 additions and 6 deletions

View file

@ -1517,11 +1517,10 @@ App::post('/v1/account/recovery')
$body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl'); $body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl');
$content = Template::fromString($locale->getText('account.emails.recovery.body')); $content = Template::fromString($locale->getText('account.emails.recovery.body'));
$cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl'); // $cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$body $body
->setParam('{{content}}', $content->render(false)) ->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.recovery.title')) ->setParam('{{title}}', $locale->getText('account.emails.recovery.title'))
->setParam('{{direction}}', $locale->getText('settings.direction')) ->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]'])) ->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
@ -1721,11 +1720,10 @@ App::post('/v1/account/verification')
$body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl'); $body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl');
$content = Template::fromString($locale->getText('account.emails.verification.body')); $content = Template::fromString($locale->getText('account.emails.verification.body'));
$cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl'); // $cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$body $body
->setParam('{{content}}', $content->render(false)) ->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.verification.title')) ->setParam('{{title}}', $locale->getText('account.emails.verification.title'))
->setParam('{{direction}}', $locale->getText('settings.direction')) ->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]'])) ->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))

View file

@ -421,12 +421,11 @@ App::post('/v1/teams/:teamId/memberships')
$body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl'); $body = Template::fromFile(__DIR__.'/../../config/locale/templates/email-base.tpl');
$content = Template::fromString($locale->getText('account.emails.invitation.body')); $content = Template::fromString($locale->getText('account.emails.invitation.body'));
$cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl'); // $cta = Template::fromFile(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$title = \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]'])); $title = \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]']));
$body $body
->setParam('{{content}}', $content->render(false)) ->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $title) ->setParam('{{title}}', $title)
->setParam('{{direction}}', $locale->getText('settings.direction')) ->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]'])) ->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))