forked from smrealms/smr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide more details in the admin page about the newsletter that will be sent (i.e. newsletter number, html text, and plain text). If there are no newsletters, displays a message saying so, rather than sending a blank newsletter. To ensure that the sent newsletter is the same as the previewed one, we no longer query the database in the processing page; instead, we _only_ do it in the preview page and then pass that data onward. This addresses the preview capabilities requested in issue smrealms#39.
- Loading branch information
Showing
3 changed files
with
62 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,35 @@ | ||
This uses the last newsletter to be added to the DB!<br /> | ||
Please enter an eMail address where the newsletter should be sent (* for all): | ||
<?php echo create_echo_form($ProcessingContainer); ?> | ||
<input type="text" name="to_email" value="<?php echo htmlspecialchars($CurrentEmail); ?>" id="InputFields" size="25"> | ||
<?php echo create_submit('Send'); ?> | ||
</form> | ||
<?php | ||
if (!isset($NewsletterId)) { ?> | ||
No newsletters in the database!<?php | ||
} else { ?> | ||
<h2>Send Newsletter</h2> | ||
<p>This sends the latest newsletter added to the DB: Newsletter #<?php echo $NewsletterId; ?></p> | ||
|
||
<p>Enter a recipient address (* for all players). Please send to yourself first to verify that | ||
everything displays as intended.</p> | ||
<?php echo $ProcessingForm; ?> | ||
<input type="text" name="to_email" value="<?php echo htmlspecialchars($CurrentEmail); ?>" id="InputFields" size="25"> | ||
|
||
<p><?php echo create_submit('Send'); ?></p> | ||
</form> | ||
<br /><br /> | ||
|
||
<h2>Newsletter #<?php echo $NewsletterId; ?> Preview</h2> | ||
<p>HTML body (will be displayed in most e-mail clients):</p> | ||
<table class="standard"> | ||
<tr> | ||
<td><?php echo $NewsletterHtml; ?></td> | ||
</tr> | ||
</table> | ||
<br /> | ||
|
||
<p>Plain text body (will only be displayed if HTML is empty or in e-mail clients that don't support HTML):</p> | ||
<table class="standard"> | ||
<tr> | ||
<td><pre><?php echo $NewsletterText; ?></pre></td> | ||
</tr> | ||
</table> | ||
|
||
<?php | ||
} | ||
?> |