forceUrl parameter for mailing subscription

This commit is contained in:
Jeremy Kauffman 2019-02-05 17:12:00 -05:00
parent 8a7e844397
commit f12726c443
4 changed files with 5 additions and 2 deletions

View file

@ -89,7 +89,7 @@ class Controller
case 'lbry.tv': case 'lbry.tv':
return ContentActions::executeTv(); return ContentActions::executeTv();
} }
} elseif (substr($uri, 0, 5) !== '/list') { //especially this line } else {
return static::redirect('/'); return static::redirect('/');
} }
} }

View file

@ -1,7 +1,8 @@
<?php $error = $error ?? null ?> <?php $error = $error ?? null ?>
<?php $tag = $tag ?? null ?> <?php $tag = $tag ?? null ?>
<?php $largeInput = $largeInput ?? false ?> <?php $largeInput = $largeInput ?? false ?>
<form id="mail_form" action="/list/subscribe" method="POST" novalidate> <?php $forceUrl = $forceUrl ?? '' //for cross-domain landing pages ?>
<form id="mail_form" action="<?php echo $forceUrl ?>/list/subscribe" method="POST" novalidate>
<?php if ($error): ?> <?php if ($error): ?>
<div class="notice notice-error spacer1"><?php echo $error ?></div> <div class="notice notice-error spacer1"><?php echo $error ?></div>

View file

@ -5,6 +5,7 @@
<?php echo View::render('mail/_subscribeForm', [ <?php echo View::render('mail/_subscribeForm', [
'tag' => 'lbryorg', 'tag' => 'lbryorg',
'forceUrl' => 'https://lbry.io',
'submitLabel' => 'Sign Me Up', 'submitLabel' => 'Sign Me Up',
]) ?> ]) ?>

View file

@ -5,6 +5,7 @@
<?php echo View::render('mail/_subscribeForm', [ <?php echo View::render('mail/_subscribeForm', [
'tag' => 'lbrytv', 'tag' => 'lbrytv',
'forceUrl' => 'https://lbry.io',
'submitLabel' => 'Sign Me Up', 'submitLabel' => 'Sign Me Up',
]) ?> ]) ?>