diff options
Diffstat (limited to 'templates/user_register_inc.tpl')
| -rw-r--r-- | templates/user_register_inc.tpl | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/templates/user_register_inc.tpl b/templates/user_register_inc.tpl index 4cab540..79fe5a9 100644 --- a/templates/user_register_inc.tpl +++ b/templates/user_register_inc.tpl @@ -1,9 +1,25 @@ +<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" name="unsubscribe[]" value="{$newsletter.nl_id}"/><strong>{$newsletter.title}</strong><br/> + <input type="checkbox" checked="true" name="subscribe[]" value="{$newsletter.nl_id}"/><strong>{$newsletter.title}</strong><br/> {/foreach} - {formhelp note="Check the box to opt-out of the specified newsletter."} + <input type="checkbox" onclick="unsubscribe_all();"/><strong>Unsubscribe All</strong><br/> + {formhelp note="Uncheck the boxes to opt-out of the specified newsletter."} {/forminput} </div> |
