<div class="reveal tiny save-as-newsletter-message-modal" id="save-as-newsletter-message-modal" data-reveal>
    <button type="button" class="close-button" data-close aria-label="Close modal"><span aria-hidden="true">&times;</span></button>
    <h1><?php echo $view['translator']->trans('newsShow.saveAsNewsletterMessage'); ?></h1>

    <?php if (! empty($campaigns)): ?>
        <form action="<?php echo $view['router']->path('wi_admin_newsletter_messagecontent_save_news_as_message', ['id' => $news->getId()]); ?>" method="POST">
            <div class="option-row">
                <label><?php echo $view['translator']->trans('saveAsNewsletterMessageModal.campaign.title'); ?></label>
                <div class="option-content">
                    <select name="campaign_id">
                    <?php foreach ($campaigns as $campaign): ?>
                        <option value="<?php echo $campaign->getId(); ?>"><?php echo $campaign->getName(); ?></option>
                    <?php endforeach ?>
                    </select>
                </div>
            </div>

            <div class="option-row">
                <label><?php echo $view['translator']->trans('saveAsNewsletterMessageModal.template.title'); ?></label>
                <div class="option-content">
                    <select name="template_type">
                        <option value="short"><?php echo $view['translator']->trans('saveAsNewsletterMessageModal.template.options.short'); ?></option>
                        <option value="full"><?php echo $view['translator']->trans('saveAsNewsletterMessageModal.template.options.full'); ?></option>
                    </select>
                </div>
            </div>

            <div class="option-row">
                <button type="submit" class="button tiny save-as-message"><?php echo $view['translator']->trans('Form.send'); ?></button>
            </div>
        </form>
    <?php else: ?>
        <div class="callout secondary" style="margin-top: 5px;">
            <?php echo $view['translator']->trans('saveAsNewsletterMessageModal.noCampaignsAvailable'); ?>
        </div>
    <?php endif ?>
</div>
