Fossil SCM
Only show the 'you will be able to attach files after saving' /forumnew notification in browsers which show NOSCRIPT content, as the JS editor integrates attachments.
Commit
8ada7fa8bec576e4a8ce3d2adb6c88757dd3e2f175f23d38c6df018112b3c507
Parent
ca906591c3cc712…
1 file changed
+6
-4
+6
-4
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -2019,17 +2019,19 @@ | ||
| 2019 | 2019 | } |
| 2020 | 2020 | } |
| 2021 | 2021 | |
| 2022 | 2022 | /* |
| 2023 | 2023 | ** If the user has AttachForum permissions, emit a notice that |
| 2024 | -** attachments may be added after saving. If p is not NULL, | |
| 2025 | -** also emit its list of attachments. | |
| 2024 | +** attachments may be added after saving. If p is not NULL, also emit | |
| 2025 | +** its list of attachments. We only emit this for No-JS environments, | |
| 2026 | +** as in JS environments the interactive forum editor includes | |
| 2027 | +** attachment support. | |
| 2026 | 2028 | */ |
| 2027 | 2029 | static void forum_render_attachment_notice(void){ |
| 2028 | 2030 | if( g.perm.AttachForum ){ |
| 2029 | - @ <div>You will be able to attach files to this post after saving | |
| 2030 | - @ it.</div> | |
| 2031 | + @ <noscript><div>You will be able to attach files to this post | |
| 2032 | + @ after saving it.</div></noscript> | |
| 2031 | 2033 | } |
| 2032 | 2034 | } |
| 2033 | 2035 | |
| 2034 | 2036 | /* |
| 2035 | 2037 | ** WEBPAGE: forume1 hidden |
| 2036 | 2038 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2019,17 +2019,19 @@ | |
| 2019 | } |
| 2020 | } |
| 2021 | |
| 2022 | /* |
| 2023 | ** If the user has AttachForum permissions, emit a notice that |
| 2024 | ** attachments may be added after saving. If p is not NULL, |
| 2025 | ** also emit its list of attachments. |
| 2026 | */ |
| 2027 | static void forum_render_attachment_notice(void){ |
| 2028 | if( g.perm.AttachForum ){ |
| 2029 | @ <div>You will be able to attach files to this post after saving |
| 2030 | @ it.</div> |
| 2031 | } |
| 2032 | } |
| 2033 | |
| 2034 | /* |
| 2035 | ** WEBPAGE: forume1 hidden |
| 2036 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2019,17 +2019,19 @@ | |
| 2019 | } |
| 2020 | } |
| 2021 | |
| 2022 | /* |
| 2023 | ** If the user has AttachForum permissions, emit a notice that |
| 2024 | ** attachments may be added after saving. If p is not NULL, also emit |
| 2025 | ** its list of attachments. We only emit this for No-JS environments, |
| 2026 | ** as in JS environments the interactive forum editor includes |
| 2027 | ** attachment support. |
| 2028 | */ |
| 2029 | static void forum_render_attachment_notice(void){ |
| 2030 | if( g.perm.AttachForum ){ |
| 2031 | @ <noscript><div>You will be able to attach files to this post |
| 2032 | @ after saving it.</div></noscript> |
| 2033 | } |
| 2034 | } |
| 2035 | |
| 2036 | /* |
| 2037 | ** WEBPAGE: forume1 hidden |
| 2038 |