Merge remote-tracking branch 'refs/remotes/origin/master' into next
[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 require(['Language', 'WoltLab/WCF/Controller/User/Notification/Settings'], function(Language, ControllerUserNotificationSettings) {
10 Language.addObject({
11 'wcf.user.notification.mailNotificationType.daily': '{lang}wcf.user.notification.mailNotificationType.daily{/lang}',
12 'wcf.user.notification.mailNotificationType.instant': '{lang}wcf.user.notification.mailNotificationType.instant{/lang}',
13 'wcf.user.notification.mailNotificationType.none': '{lang}wcf.user.notification.mailNotificationType.none{/lang}'
14 });
15
16 ControllerUserNotificationSettings.setup();
17 });
18 </script>
19 </head>
20
21 <body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}">
22
23 {include file='userMenuSidebar'}
24
25 {include file='header'}
26
27 <header class="contentHeader">
28 <div class="contentHeaderTitle">
29 <h1 class="contentTitle">{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang}</h1>
30 <p class="contentHeaderDescription">{lang}wcf.user.notification.notifications.description{/lang}</p>
31 </div>
32
33 {hascontent}
34 <nav class="contentHeaderNavigation">
35 <ul>
36 {content}{event name='contentHeaderNavigation'}{/content}
37 </ul>
38 </nav>
39 {/hascontent}
40 </header>
41
42 {include file='userNotice'}
43
44 {include file='formError'}
45
46 {if $success|isset}
47 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
48 {/if}
49
50 <form method="post" action="{link controller='NotificationSettings'}{/link}">
51 <div id="notificationSettings">
52 {foreach from=$events key='eventCategory' item='eventList'}
53 <section class="section">
54 <h2 class="sectionTitle">{lang}wcf.user.notification.{$eventCategory}{/lang}</h2>
55
56 <dl>
57 {foreach from=$eventList item=event}
58 <dt>{lang}wcf.user.notification.{$event->objectType}.{$event->eventName}{/lang}</dt>
59 <dd>
60 <ol class="flexibleButtonGroup" data-object-id="{@$event->eventID}">
61 <li>
62 <input type="radio" id="settings_{@$event->eventID}_disabled" name="settings[{@$event->eventID}][enabled]" value="0"{if $settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
63 <label for="settings_{@$event->eventID}_disabled" class="red">
64 <span class="icon icon16 fa-times"></span>
65 {lang}wcf.user.notification.notifications.disabled{/lang}
66 </label>
67 </li>
68 <li class="spaceAfter">
69 <input type="radio" id="settings_{@$event->eventID}_enabled" name="settings[{@$event->eventID}][enabled]" value="1"{if !$settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
70 <label for="settings_{@$event->eventID}_enabled" class="green">
71 <span class="icon icon16 fa-bell"></span>
72 {lang}wcf.user.notification.notifications.enabled{/lang}
73 </label>
74 </li>
75 {if $event->supportsEmailNotification()}
76 <li class="notificationSettingsEmail{if !$settings[$event->eventID][enabled]|empty} active{/if}">
77 <input type="hidden" id="settings_{$event->eventID}_mailNotificationType" name="settings[{@$event->eventID}][mailNotificationType]" value="{$settings[$event->eventID][mailNotificationType]}">
78 <a{if $settings[$event->eventID][mailNotificationType] !== 'none'} class="active yellow"{/if}>
79 <span class="icon icon16 fa-envelope-o"></span>
80 <span class="title">{lang}wcf.user.notification.mailNotificationType.{$settings[$event->eventID][mailNotificationType]}{/lang}</span>
81 <span class="icon icon16 fa-caret-down"></span>
82 </a>
83 </li>
84 {/if}
85 </ol>
86 </dd>
87 {/foreach}
88 </dl>
89 </section>
90 {/foreach}
91
92 {event name='sections'}
93 </div>
94
95 <div class="formSubmit">
96 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
97 {@SECURITY_TOKEN_INPUT_TAG}
98 </div>
99 </form>
100
101 {include file='footer'}
102
103 </body>
104 </html>