|
4 | 4 | <hr style="width: 35%; margin-left: 0;" />
|
5 | 5 |
|
6 | 6 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
7 |
| - <span>Do you want to be notified by email for comments on your posts? </span> |
| 7 | + <span>Do you want to be notified by a email for comments on your posts? </span> |
8 | 8 | <span>
|
9 | 9 | <label class="switch">
|
10 | 10 | <p> Notification switch </p>
|
|
18 | 18 | <br />
|
19 | 19 |
|
20 | 20 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
21 |
| - <span>Do you want to be notified by email for likes on your posts? </span> |
| 21 | + <span>Do you want to be notified by a email for likes on your posts? </span> |
22 | 22 | <span>
|
23 | 23 | <label class="switch">
|
24 | 24 | <p> Notification switch </p>
|
|
32 | 32 | <br />
|
33 | 33 |
|
34 | 34 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
35 |
| - <span>Do you want to be notified by email for comments on all posts you've commented on? </span> |
| 35 | + <span>Do you want to be notified by a email for comments on all posts you've commented on? </span> |
36 | 36 | <span>
|
37 | 37 | <label class="switch">
|
38 | 38 | <p> Notification switch </p>
|
|
47 | 47 |
|
48 | 48 | <% if logged_in_as(['admin', 'moderator']) %>
|
49 | 49 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
50 |
| - <span>Do you want to be notified by email for moderation emails? </span> |
| 50 | + <span>Do you want to be notified by a email for moderation emails? </span> |
51 | 51 | <span>
|
52 | 52 | <label class="switch">
|
53 | 53 | <p> Notification switch </p>
|
|
63 | 63 |
|
64 | 64 |
|
65 | 65 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
66 |
| - <span>Do you want to receive customized digest weekly?</span> |
| 66 | + <span>Do you want to receive a customized digest weekly?</span> |
67 | 67 | <span>
|
68 | 68 | <label style=" vertical-align: middle;" class="switch">
|
69 | 69 | <p> Notification switch </p>
|
|
77 | 77 | <br />
|
78 | 78 |
|
79 | 79 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
80 |
| - <span>Do you want to receive customized digest daily?</span> |
| 80 | + <span>Do you want to receive a customized digest daily?</span> |
81 | 81 | <span>
|
82 | 82 | <label style=" vertical-align: middle;" class="switch">
|
83 | 83 | <p> Notification switch </p>
|
|
91 | 91 | <br />
|
92 | 92 |
|
93 | 93 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
94 |
| - <span>Do you want to receive browser notification when you are mentioned?</span> |
| 94 | + <span>Do you want to receive a browser notification when you are mentioned?</span> |
95 | 95 | <span>
|
96 | 96 | <label style=" vertical-align: middle;" class="switch">
|
97 | 97 | <p> Notification switch </p>
|
|
105 | 105 | <br />
|
106 | 106 |
|
107 | 107 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
108 |
| - <span>Do you want to receive browser notification for all ?</span> |
| 108 | + <span>Do you want to receive a browser notification for all ?</span> |
109 | 109 | <span>
|
110 | 110 | <label style=" vertical-align: middle;" class="switch">
|
111 | 111 | <p> Notification switch </p>
|
|
119 | 119 | <br />
|
120 | 120 |
|
121 | 121 | <div style="display: inline-flex; justify-content: space-between; width: 90%;">
|
122 |
| - <span>Do you want to receive browser notification when someone likes your work?</span> |
| 122 | + <span>Do you want to receive a browser notification when someone likes your work?</span> |
123 | 123 | <span>
|
124 | 124 | <label style=" vertical-align: middle;" class="switch">
|
125 | 125 | <p> Notification switch </p>
|
|
172 | 172 | <!-- <br />-->
|
173 | 173 | <!-- <br />-->
|
174 | 174 |
|
175 |
| -</div> |
176 | 175 |
|
| 176 | + <br> |
| 177 | + <% if current_user.can_moderate? %> |
| 178 | + <h4><b>Spam Digest Settings</b></h4> |
| 179 | + <hr style="width: 35%; margin-left: 0;" /> |
| 180 | + <div style="display: inline-flex; justify-content: space-between; width: 90%;"> |
| 181 | + <span>Do you want to receive a weekly digest for unmoderated posts?</span> |
| 182 | + <span> |
| 183 | + <label style=" vertical-align: middle;" class="switch"> |
| 184 | + <p> Notification switch </p> |
| 185 | + <input type="checkbox" name="digest:weekly:spam" <% if UserTag.exists?(current_user.id, 'digest:weekly:spam') %>checked<% end %>> |
| 186 | + <span class="slider round"></span> |
| 187 | + </label> |
| 188 | + </span> |
| 189 | + </div> |
| 190 | + |
| 191 | + <br /> |
| 192 | + <br /> |
| 193 | + |
| 194 | + <div style="display: inline-flex; justify-content: space-between; width: 90%;"> |
| 195 | + <span>Do you want to receive a daily digest for unmoderated posts?</span> |
| 196 | + <span> |
| 197 | + <label style=" vertical-align: middle;" class="switch"> |
| 198 | + <p> Notification switch </p> |
| 199 | + <input type="checkbox" name="digest:daily:spam" <% if UserTag.exists?(current_user.id, 'digest:daily:spam') %>checked<% end %>> |
| 200 | + <span class="slider round"></span> |
| 201 | + </label> |
| 202 | + </span> |
| 203 | + </div> |
| 204 | + |
| 205 | + <br /> |
| 206 | + <br /> |
| 207 | + <% end %> |
| 208 | +</div> |
177 | 209 |
|
178 | 210 | <br />
|
179 | 211 | <br />
|
|
268 | 300 | $(':input[name="digest:daily"]').prop('checked', false);
|
269 | 301 | }
|
270 | 302 | });
|
| 303 | + $(':input[name="digest:daily:spam"]').change(function () { |
| 304 | + if($(':input[name="digest:daily:spam"]').prop('checked') === true){ |
| 305 | + $(':input[name="digest:weekly:spam"]').prop('checked', false); |
| 306 | + } |
| 307 | + }); |
| 308 | + |
| 309 | + $(':input[name="digest:weekly:spam"]').change(function () { |
| 310 | + if($(':input[name="digest:weekly:spam"]').prop('checked') === true){ |
| 311 | + $(':input[name="digest:daily:spam"]').prop('checked', false); |
| 312 | + } |
| 313 | + }); |
271 | 314 | });
|
272 | 315 | </script>
|
0 commit comments