Mercurial Hosting > nabble
diff src/nabble/view/naml/post_by_email_page.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/nabble/view/naml/post_by_email_page.naml Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,152 @@ +<macro name="post_by_email_page" requires="servlet"> + <n.node_page.> + <n.if.is_submitted_form> + <then> + <n.catch_exception. id="send-email-block"> + <n.send_email_address/> + </n.catch_exception.> + </then> + </n.if.is_submitted_form> + <n.html> + <head> + <n.title.><t>Post by Email</t></n.title.> + </head> + <body> + <n.edit_header first_text="[t]Post by Email[/t]" second_text="[n.page_node.subject/]" /> + + <n.if.is_submitted_form> + <then> + <n.if.has_exception for="send-email-block"> + <then> + <n.show_email_error/> + </then> + <else> + <table class="info-message" style="width:100%;padding:.5em"> + <tr> + <td><img src="/images/success.png"/></td> + <td style="width:100%;font-weight:bold"><t>An email has been sent to you.</t></td> + </tr> + </table> + </else> + </n.if.has_exception> + </then> + </n.if.is_submitted_form> + + <div style="margin:1em 0 2em"> + <n.if.visitor.is_anonymous> + <then> + <t>To prevent spam, the email address to use when posting by email is <b>unique</b> for each user.</t> + <t>To see which email address you should use to post, please <n.login_link.>login</n.login_link.> or <n.register_link.>register</n.register_link.>.</t> + <n.if.page_node.only_members_can_create_topics> + <then> + <t>You will need authorization to post new topics in <t.location.page_node.subject/>, so in addition to registering you will have to be + approved by the administrators.</t> + </then> + <else> + <t>If you don't want to register yet, just enter the email address from which you intend to post, + and your personal address will be emailed to you.</t> + <div class="second-font big-title" style="margin:1.2em 0 .2em"> + <t>Enter your email address</t> + </div> + <n.form.> + <input type="hidden" name="node" value="[n.page_node.id/]"/> + <input type="hidden" name="action" value="send"/> + <input type="text" size="40" maxlength="80" name="email"/><br/> + <input type="submit" value="[t]Send email to me[/t]" style="margin-top:.5em"/> + </n.form.> + </else> + </n.if.page_node.only_members_can_create_topics> + </then> + <else> + <n.if.either condition1="[n.not.page_node.only_members_can_create_topics/]" condition2="[n.visitor.can_create_topic_in.page_node/]"> + <then> + <t>Instead of posting via the web interface, you can also post new topics by sending emails to the following email address:</t> + <div style="padding:1em"> + <span class="info-message rounded bold" style="padding:.4em .3em"> + <n.page_node.subject/> + <<span class="weak-color" style="font-weight:bold"><n.page_node.user_address email="[n.visitor.user_email/]"/></span>> + </span> + </div> + <table style="width:60em"> + <tr valign="top"> + <td><img src="/images/icon_alert_sm.png"/></td> + <td> + <t>Note that this address is unique to you and only accepts emails sent from <t.address><b><n.visitor.user_email/></b></t.address>. + The purpose of this design is to help prevent spam.</t> + </td> + </tr> + </table> + </then> + <else> + <t>Sorry, but only members can post messages under <t.app.page_node.subject/>.</t><br/> + <t>Please contact the administrators if you need help.</t> + </else> + </n.if.either> + </else> + </n.if.visitor.is_anonymous> + </div> + « <n.page_node.node_link text="[t]Go back[/t]"/> + </body> + </n.html> + </n.node_page.> +</macro> + +<macro name="show_email_error"> + <n.format_error.handle_exception. for="send-email-block"> + <n.exception. name="invalid_email"> + <t>Enter a valid email address.</t> + </n.exception.> + </n.format_error.handle_exception.> +</macro> + +<macro name="send_email_address" requires="node_page,servlet" unindent="true"> + <n.new_email.> + <n.send> + <to><n.get_parameter name="email"/></to> + <subject><t>Email for <t.app.page_node.subject/></t></subject> + <text_part> + <t>Dear user,</t> + + <t>As you requested, the email address to post new topics under <t.app.page_node.subject/> is:</t> + + <n.page_node.subject/> <<n.page_node.user_address email="[n.get_parameter name='email'/]"/>> + + <t>Note that this address is unique to you and only accepts emails sent from <t.address.get_parameter name="email"/>. + The purpose of this design is to help prevent spam.</t> + + <t>Visit <t.app.page_node.subject/> at:</t> + <n.page_node.url/> + + <t>If you didn't request this email or have no idea why you received it, please ignore it. It might have been a mistake from someone else.</t> + + <t>Sincerely,</t> + <t>The Nabble team</t> + ________________________________________ + <t>Free Embeddable <t.app.page_node.view_name/></t> powered by Nabble + <n.nabble_homepage/> + </text_part> + <html_part> + <t>Dear user,</t><br/> + <br/> + <t>As you requested, the email address to post new topics under <t.app><b><n.page_node.subject/></b></t.app> is:</t> + <div style="background-color:#FFFADB;border:#EDDD79 solid 1px;margin:1.2em 0;padding:.5em"> + <n.page_node.subject/> <<n.page_node.user_address email="[n.get_parameter name='email'/]"/>> + </div> + <t>Note that this address is unique to you and only accepts emails sent from <t.address.get_parameter name="email"/>. + The purpose of this design is to help prevent spam.</t><br/> + <br/> + <t>Visit <t.app.page_node.subject/> at:</t><br/> + <n.page_node.url/><br/> + <br/> + <t>If you didn't request this email or have no idea why you received it, please ignore it. It might have been a mistake from someone else.</t> + <br/> + <br/> + <t>Sincerely,</t><br/> + <t>The Nabble team</t><br/> + ________________________________________<br/> + <t>Free Embeddable <t.app.page_node.view_name/></t> powered by Nabble<br/> + <n.nabble_homepage/><br/><br/> + </html_part> + </n.send> + </n.new_email.> +</macro>