Added proper support for font size and color
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / notificationSettings.tpl
1 {capture assign='pageTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang} - {lang}wcf.user.menu.settings{/lang}{/capture}
2
3 {capture assign='contentTitle'}{lang}wcf.user.menu.settings{/lang}: {lang}wcf.user.notification.notifications{/lang}{/capture}
4
5 {capture assign='contentDescription'}{lang}wcf.user.notification.notifications.description{/lang}{/capture}
6
7 {include file='userMenuSidebar'}
8
9 {include file='header'}
10
11 {include file='formError'}
12
13 {if $success|isset}
14 <p class="success">{lang}wcf.global.success.edit{/lang}</p>
15 {/if}
16
17 <form method="post" action="{link controller='NotificationSettings'}{/link}">
18 <div id="notificationSettings">
19 {foreach from=$events key='eventCategory' item='eventList'}
20 <section class="section">
21 <h2 class="sectionTitle">{lang}wcf.user.notification.{$eventCategory}{/lang}</h2>
22
23 <dl>
24 {foreach from=$eventList item=event}
25 <dt>{lang}wcf.user.notification.{$event->objectType}.{$event->eventName}{/lang}</dt>
26 <dd>
27 <ol class="flexibleButtonGroup" data-object-id="{@$event->eventID}">
28 <li>
29 <input type="radio" id="settings_{@$event->eventID}_disabled" name="settings[{@$event->eventID}][enabled]" value="0"{if $settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
30 <label for="settings_{@$event->eventID}_disabled" class="red">
31 <span class="icon icon16 fa-times"></span>
32 {lang}wcf.user.notification.notifications.disabled{/lang}
33 </label>
34 </li>
35 <li class="spaceAfter">
36 <input type="radio" id="settings_{@$event->eventID}_enabled" name="settings[{@$event->eventID}][enabled]" value="1"{if !$settings[$event->eventID][enabled]|empty} checked="checked"{/if}>
37 <label for="settings_{@$event->eventID}_enabled" class="green">
38 <span class="icon icon16 fa-bell"></span>
39 {lang}wcf.user.notification.notifications.enabled{/lang}
40 </label>
41 </li>
42 {if $event->supportsEmailNotification()}
43 <li class="notificationSettingsEmail{if !$settings[$event->eventID][enabled]|empty} active{/if}">
44 <input type="hidden" id="settings_{$event->eventID}_mailNotificationType" name="settings[{@$event->eventID}][mailNotificationType]" value="{$settings[$event->eventID][mailNotificationType]}">
45 <a{if $settings[$event->eventID][mailNotificationType] !== 'none'} class="active yellow"{/if}>
46 <span class="icon icon16 fa-envelope-o"></span>
47 <span class="title">{lang}wcf.user.notification.mailNotificationType.{$settings[$event->eventID][mailNotificationType]}{/lang}</span>
48 <span class="icon icon16 fa-caret-down"></span>
49 </a>
50 </li>
51 {/if}
52 </ol>
53 </dd>
54 {/foreach}
55 </dl>
56 </section>
57 {/foreach}
58
59 {event name='sections'}
60 </div>
61
62 <div class="formSubmit">
63 <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
64 {@SECURITY_TOKEN_INPUT_TAG}
65 </div>
66 </form>
67
68 <script data-relocate="true">
69 require(['Language', 'WoltLab/WCF/Controller/User/Notification/Settings'], function(Language, ControllerUserNotificationSettings) {
70 Language.addObject({
71 'wcf.user.notification.mailNotificationType.daily': '{lang}wcf.user.notification.mailNotificationType.daily{/lang}',
72 'wcf.user.notification.mailNotificationType.instant': '{lang}wcf.user.notification.mailNotificationType.instant{/lang}',
73 'wcf.user.notification.mailNotificationType.none': '{lang}wcf.user.notification.mailNotificationType.none{/lang}'
74 });
75
76 ControllerUserNotificationSettings.setup();
77 });
78 </script>
79
80 {include file='footer'}