Merge branch '2.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / notificationSettings.tpl
1 {include file='documentHeader'}
2
3 <head>
4 <title>{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang} - {lang}wcf.user.menu.settings{/lang} - {PAGE_TITLE|language}</title>
5
6 {include file='headInclude'}
7
8 <script data-relocate="true">
9 //<![CDATA[
10 $(function() {
11 $('#notificationSettings > fieldset > dl > dd > label > input').each(function(index, value) {
12 var $input = $(value);
13 $input.on('click', function(event) {
14 var $input = $(event.currentTarget);
15 $input.parents('dd').find('.jsMailNotificationType').toggle();
16 });
17 if (!$input.is(':checked')) {
18 $input.parents('dd').find('.jsMailNotificationType').hide();
19 }
20 });
21 });
22 //]]>
23 </script>
24 </head>
25
26 <body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}">
27
28 {include file='userMenuSidebar'}
29
30 {include file='header' sidebarOrientation='left'}
31
32 <header class="boxHeadline">
33 <h1>{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang}</h1>
34 </header>
35
36 {include file='userNotice'}
37
38 {include file='formError'}
39
40 {if $success|isset}
41 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
42 {/if}
43
44 <div class="contentNavigation">
45 {hascontent}
46 <nav>
47 <ul>
48 {content}
49 {event name='contentNavigationButtons'}
50 {/content}
51 </ul>
52 </nav>
53 {/hascontent}
54 </div>
55
56 <form method="post" action="{link controller='NotificationSettings'}{/link}">
57 <div class="container containerPadding marginTop" id="notificationSettings">
58 {foreach from=$events key='eventCategory' item='eventList'}
59 <fieldset>
60 <legend>{lang}wcf.user.notification.{$eventCategory}{/lang}</legend>
61
62 <dl>
63 {foreach from=$eventList item=event}
64 <dd>
65 <label><input type="checkbox" name="settings[{@$event->eventID}][enabled]" value="1"{if !$settings[$event->eventID][enabled]|empty} checked="checked"{/if} /> {lang}wcf.user.notification.{$event->objectType}.{$event->eventName}{/lang}</label>
66 {hascontent}<small>{content}{lang __optional=true}wcf.user.notification.{$event->objectType}.{$event->eventName}.description{/lang}{/content}</small>{/hascontent}
67 {if $event->supportsEmailNotification()}
68 <small class="jsMailNotificationType">
69 <select name="settings[{@$event->eventID}][mailNotificationType]">
70 <option value="none">{lang}wcf.user.notification.mailNotificationType.none{/lang}</option>
71 <option value="instant"{if $settings[$event->eventID][mailNotificationType] == 'instant'} selected="selected"{/if}>{lang}wcf.user.notification.mailNotificationType.instant{/lang}</option>
72 <option value="daily"{if $settings[$event->eventID][mailNotificationType] == 'daily'} selected="selected"{/if}>{lang}wcf.user.notification.mailNotificationType.daily{/lang}</option>
73 </select>
74 </small>
75 {else}
76 <small class="jsMailNotificationType">{lang}wcf.user.notification.mailNotificationType.notSupported{/lang}</small>
77 {/if}
78 </dd>
79 {/foreach}
80 </dl>
81 </fieldset>
82 {/foreach}
83
84 {event name='fieldsets'}
85 </div>
86
87 <div class="formSubmit">
88 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
89 {@SECURITY_TOKEN_INPUT_TAG}
90 </div>
91 </form>
92
93 {include file='footer'}
94
95 </body>
96 </html>