2018-08-17 17:01:16 -04:00
<? php $formId = 'email_form' ?>
2018-08-16 22:55:04 -04:00
<?php js_start() ?>
2018-08-21 19:08:15 -04:00
lbry.emailSettingsForm("#<?php echo $formId ?>", <?php echo json_encode($tags) ?>, <?php echo json_encode($token) ?>);
2018-08-16 22:55:04 -04:00
<?php js_end() ?>
2018-08-21 19:08:15 -04:00
2018-08-17 17:01:16 -04:00
<noscript>
2019-03-19 16:59:22 -05:00
Javascript is required to securely send your unsubscribe information. Email <a href="mailto:help@lbry.com" class="link-primary">help@lbry.com</a> for manual unsubscription.
2018-08-17 17:01:16 -04:00
</noscript>
2019-03-18 13:05:46 -05:00
2018-09-21 16:28:15 -04:00
<?php if ($error): ?>
<div class="notice notice-error spacer1"><?php echo $error ?></div>
<?php else: ?>
<form id="<?php echo $formId ?>" novalidate style="display: none">
2019-08-08 15:01:58 -05:00
<section class="email-section" style="position: relative;">
2018-09-21 16:28:15 -04:00
<h4><?php echo count($emails) > 1 ? 'Receiving Addresses' : 'Do You Want To Receive Mail?' ?></h4>
<?php if (count($emails) > 1): ?>
<div class="meta spacer-half">Uncheck all boxes if you want to receive no future messages.</div>
<?php endif ?>
2019-03-18 13:05:46 -05:00
2018-09-21 16:28:15 -04:00
<div class="notice notice-error hide spacer-half"></div>
<div class="notice notice-success hide spacer-half">Your email preferences have been updated.</div>
2019-03-18 13:05:46 -05:00
2018-09-21 16:28:15 -04:00
<?php $emailIndex = 0 ?>
2019-03-18 13:05:46 -05:00
<?php foreach ($emails as $email => $enabled): ?>
<?php $emailId = 'email_' . (++$emailIndex) ?>
<checkbox-element>
<input id="<?php echo $emailId ?>" name="<?php echo $emailId ?>" type="checkbox"<?php echo $enabled ? " checked" : "" ?> value="<?php echo urlencode($email) ?>"/>
2019-09-18 14:51:42 -04:00
<label for="<?php echo $emailId ?>"><?php echo $email ?></label>
2019-03-18 13:05:46 -05:00
<checkbox-toggle/>
</checkbox-element>
<?php endforeach ?>
2018-09-21 16:28:15 -04:00
</section>
2018-09-21 16:02:45 -04:00
2019-08-08 15:01:58 -05:00
<section class="tag-section spacer1" style="position: relative;">
2018-09-21 16:28:15 -04:00
<h4>Fine-tune your Mail</h4>
<div class="notice notice-error hide spacer-half"></div>
<div class="notice notice-success hide spacer-half">Your email preferences have been updated.</div>
2018-09-21 16:02:45 -04:00
2019-03-18 13:05:46 -05:00
<?php $tagIndex = 0 ?>
<?php foreach ($tags as $tag => $enabled): ?>
2019-09-18 14:51:42 -04:00
<?php if (!isset($tagMetadata[$tag])) {
continue;
} //fix/kill this?>
2018-09-21 16:28:15 -04:00
<?php $tagId = 'tag_' . (++$tagIndex) ?>
2019-09-18 14:51:42 -04:00
<checkbox-element>
<input id="<?php echo $tagId ?>" name="<?php echo $tagId ?>" type="checkbox"<?php echo $enabled ? " checked" : "" ?> value="<?php echo urlencode($tag) ?>"/>
<label for="<?php echo $tagId ?>">
<?php echo isset($tagMetadata[$tag]['label']) ? $tagMetadata[$tag]['label'] : $tag ?>
<?php if (isset($tagMetadata[$tag]['description'])): ?>
<span class="meta">· <?php echo $tagMetadata[$tag]['description'] ?></small>
<?php endif ?>
</label>
<checkbox-toggle/>
</checkbox-element>
2019-03-18 13:05:46 -05:00
<?php endforeach ?>
2018-09-21 16:28:15 -04:00
</section>
</form>
2018-11-08 13:09:32 -05:00
<?php endif ?>