{assign var=title value="#_TPL_NEWSLETTER_SUBSCRIPTIONS#"}
{include file="header.html"}
{include file="error.inc.html"}

<form method="post" name="newsletter" id="newsletter" action="{$smarty.server.PHP_SELF|escape}" >
<table class="vedit">
<tr><th>#_TPL_NEWSLETTER_SUBSCRIBE_TO_NEWSLETTERS#</th>
<td>
{foreach from=$threads_list item=tr}
{if $tr.is_active}
<input type="checkbox" name="tr[]" value="{$tr.thread_id}" 
{if $threads[$tr.thread_id] eq '1'}checked="checked"{/if} />
<strong>{$tr.title}</strong> <div class="small">{$tr.description}</div>
<br />
{/if}
{/foreach}
</td></tr>
<tr>
    <th>#_TPL_NEWSLETTER_NAME#</th>
    <td>
    <input type="text" name="n" value="{$vars.n|escape}" size="40" />  
    </td>
</tr>
<tr>
    <th>#_TPL_NEWSLETTER_EMAIL#</th>
    <td><input type="text" name="e" value="{$vars.e|escape}" size="40" /></td>
</tr>
</table>
<br />
<input type="hidden" name="a" value="add_guest" />
<input type="submit" value="&nbsp;&nbsp;&nbsp;#_TPL_NEWSLETTER_DO_SUBSCRIBE#&nbsp;&nbsp;&nbsp;" />
</form>


<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.select.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.metadata.min.js?smarty"></script>
<script type="text/javascript" src="{$config.root_surl}/includes/jquery/jquery.validate.pack.js?smarty"></script>

<script type="text/javascript">
$(document).ready(function(){
    $("#signup").validate({
    rules: {
    	e: "required",
    	n: "required",
	},
  	errorPlacement: function(error, element) {
		error.appendTo( element.parent());
	}
    });
});
</script>

{include file="footer.html"}

