From 00724ad440748edf6f065850d8fc431e1f97cce9 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Thu, 29 Dec 2005 21:55:56 +0000 Subject: remove duplicate edit_newsletter smarty, use include instead. add 'sending' smarty var to prevent floaticon bars in sent HTML email --- BitMailer.php | 7 +++-- admin/send.php | 3 +- templates/edit_newsletter.tpl | 4 +-- templates/list_newsletters.tpl | 67 +++--------------------------------------- templates/view_edition.tpl | 2 ++ 5 files changed, 14 insertions(+), 69 deletions(-) diff --git a/BitMailer.php b/BitMailer.php index c5c925c..d8e1580 100644 --- a/BitMailer.php +++ b/BitMailer.php @@ -1,12 +1,12 @@ * - * @version $Revision: 1.12 $ $Date: 2005/12/29 18:46:39 $ $Author: spiderr $ + * @version $Revision: 1.13 $ $Date: 2005/12/29 21:55:55 $ $Author: spiderr $ */ /** @@ -103,6 +103,7 @@ class BitMailer extends phpmailer { $unsub = ''; if( $body[$pick['content_id']]['object']->mNewsletter->mInfo['unsub_msg'] ) { $gBitSmarty->assign( 'url_code', $pick['url_code'] ); + $gBitSmarty->assign( 'sending', TRUE ); $unsub = $gBitSmarty->fetch( 'bitpackage:newsletters/unsubscribe_inc.tpl' ); } $htmlBody = $unsub . $body[$pick['content_id']]['body'] . $unsub . ''; diff --git a/admin/send.php b/admin/send.php index cd9ef8a..685ab09 100644 --- a/admin/send.php +++ b/admin/send.php @@ -1,6 +1,6 @@ assign('emited', 'n'); if( $gContent->isValid() && isset( $_REQUEST['preview'] ) ) { $recipients = $gContent->getRecipients( $_REQUEST['send_group'] ); $gBitSmarty->assign_by_ref( 'recipientList', $recipients ); + $gBitSmarty->assign( 'sending', TRUE ); } elseif( $gContent->isValid() && isset( $_REQUEST["send"] ) ) { if( $emails = $gContent->getRecipients( $_REQUEST['send_group'] ) ) { global $gBitMailer; diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl index affdf5e..2eb4116 100644 --- a/templates/edit_newsletter.tpl +++ b/templates/edit_newsletter.tpl @@ -53,7 +53,7 @@ {formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."} {/forminput} - +{*
{formlabel label="Validate e-mail Addresses" for="validate_addr"} {forminput} @@ -61,7 +61,7 @@ {formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."} {/forminput}
- +*}
diff --git a/templates/list_newsletters.tpl b/templates/list_newsletters.tpl index 1287751..be4b750 100644 --- a/templates/list_newsletters.tpl +++ b/templates/list_newsletters.tpl @@ -1,3 +1,6 @@ +{if !$newsletters || $gContent->isValid() || $smarty.request.new} + {include file="bitpackage:newsletters/edit_newsletter.tpl"} +{else} {strip}
{bithelp}
@@ -7,68 +10,6 @@
- {if !$newsletters || $gContent->isValid() || $smarty.request.new} - {form legend="Create / Edit Newsletters"} - {if $individual eq 'y'} - {tr}There are individual permissions set for this newsletter{/tr}

- {/if} - - -
- {formlabel label="Title" for="title"} - {forminput} - - {formhelp note="Title of the newsletter."} - {/forminput} -
- -
- {formlabel label="Description" for="description"} - {forminput} - - {formhelp note="Description of the newsletter, that users know what they are getting themselves into."} - {/forminput} -
- -
- {formlabel label="Users can Subscribe" for="allow_user_sub"} - {forminput} - mInfo.allow_user_sub eq 'y'}checked="checked"{/if} /> - {formhelp note="Users can subscribe to this list. Disabling this options means that you have to manually add users to the list."} - {/forminput} -
- -
- {formlabel label="Any e-mail Address" for="allow_any_sub"} - {forminput} - mInfo.allow_any_sub eq 'y'}checked="checked"{/if} /> - {formhelp note="Users may subscribe using any email address."} - {/forminput} -
- -
- {formlabel label="Append Un/Subscribe Instructions" for="unsub_msg"} - {forminput} - mInfo.unsub_msg eq 'y'}checked="checked"{/if} /> - {formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."} - {/forminput} -
- -
- {formlabel label="Validate e-mail Addresses" for="validate_addr"} - {forminput} - mInfo.validate_addr eq 'y'}checked="checked"{/if} /> - {formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."} - {/forminput} -
- -
- - -
- {/form} - - {else} {minifind} @@ -109,7 +50,7 @@ {/if} {pagination} - {/if}
{/strip} +{/if} diff --git a/templates/view_edition.tpl b/templates/view_edition.tpl index f134159..c9b4aaf 100644 --- a/templates/view_edition.tpl +++ b/templates/view_edition.tpl @@ -1,4 +1,5 @@
+ {if !$sending}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon'} @@ -10,6 +11,7 @@ {biticon ipackage=liberty iname="mail_send" iexplain="email this post"} {/if}
+ {/if}

{$gContent->getTitle()}

-- cgit v1.3