summaryrefslogtreecommitdiff
path: root/templates/user_register_inc.tpl
blob: 1e7ab512bca87c16ec2dbe2d0475affec8138e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script type = "text/javascript">
{literal}
function unsubscribe_all(){

var checkboxes = document.getElementsByName('subscribe[]');
for (var i = 0; i < checkboxes.length; i++){
	if( checkboxes[i].checked == true ){
		checkboxes[i].checked = false;
	}
}

}
{/literal}
</script>

<div class="row">
	{formlabel label="Subscriptions"}
	{forminput}
	{foreach from=$newsletters item='newsletter'}
		<input type="checkbox" checked="true" name="subscribe[]" value="{$newsletter.nl_id}"/><strong>{$newsletter.title}</strong><br/>
	{/foreach}
	{formhelp note="Uncheck the boxes to opt-out of the specified newsletter."}
		<input type="checkbox" onclick="unsubscribe_all();"/><strong>Unsubscribe All</strong><br/>
	{formhelp note="Check this box to unsubscribe from all of the above newsletters."}
	{/forminput}
</div>