1 {capture assign='pageTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang} - {lang}wcf.user.menu.settings{/lang}{/capture}
3 {capture assign='contentTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang}{/capture}
5 {include file='userMenuSidebar'}
7 {include file='header' __disableAds=true __sidebarLeftHasMenu=true}
9 {include file='shared_formError'}
12 <woltlab-core-notice type="success">{lang}wcf.global.success.edit{/lang}</woltlab-core-notice>
15 <form method="post" action="{link controller='NotificationSettings'}{/link}" id="notificationSettings">
17 {foreach from=$events key='eventCategory' item='eventList'}
18 <div class="notificationSettings">
19 <div class="notificationSettingsCategory">
20 <div class="notificationSettingsEvent">{lang}wcf.user.notification.{$eventCategory}{/lang}</div>
21 <div class="notificationSettingsState">{lang}wcf.user.notification.status.active{/lang}</div>
22 <div class="notificationSettingsEmail">{lang}wcf.user.notification.status.email{/lang}</div>
24 {foreach from=$eventList item=event}
25 <div class="notificationSettingsItem">
26 <div class="notificationSettingsEvent">
27 <label for="settings_{@$event->eventID}">{lang}wcf.user.notification.{$event->objectType}.{$event->eventName}{/lang}</label>
29 <div class="notificationSettingsState">
31 <input type="checkbox" id="settings_{@$event->eventID}" name="settings[{@$event->eventID}][enabled]" class="jsCheckboxNotificationSettingsState" value="1" data-object-id="{@$event->eventID}"{if !$settings[$event->eventID][enabled]|empty} checked{/if}>
32 {icon size=24 name='bell' type='solid'}
33 {icon size=24 name='bell-slash'}
36 <div class="notificationSettingsEmail">
37 {if $event->supportsEmailNotification()}
38 <input type="hidden" id="settings_{$event->eventID}_mailNotificationType" name="settings[{@$event->eventID}][mailNotificationType]" value="{$settings[$event->eventID][mailNotificationType]}">
39 <button type="button" class="notificationSettingsEmailType jsTooltip{if $settings[$event->eventID][enabled]|empty} disabled{/if}" title="{lang}wcf.user.notification.mailNotificationType.{@$settings[$event->eventID][mailNotificationType]}{/lang}" data-object-id="{@$event->eventID}">
40 <span class="jsIconNotificationSettingsEmailType">
41 {if $settings[$event->eventID][mailNotificationType] === 'none'}
42 {icon size=24 name='xmark'}
43 {else if $settings[$event->eventID][mailNotificationType] === 'instant'}
44 {icon size=24 name='bolt'}
46 {icon size=24 name='clock'}
49 {icon name='caret-down' type='solid'}
59 {event name='sections'}
62 <div class="formSubmit">
63 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
68 <script data-relocate="true">
69 require(['Language', 'WoltLabSuite/Core/Controller/User/Notification/Settings'], function(Language, ControllerUserNotificationSettings) {
71 'wcf.user.notification.mailNotificationType.daily': '{jslang}wcf.user.notification.mailNotificationType.daily{/jslang}',
72 'wcf.user.notification.mailNotificationType.instant': '{jslang}wcf.user.notification.mailNotificationType.instant{/jslang}',
73 'wcf.user.notification.mailNotificationType.none': '{jslang}wcf.user.notification.mailNotificationType.none{/jslang}'
76 ControllerUserNotificationSettings.init();
80 {include file='footer'}