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.

stephan 2026-06-16 13:18 UTC trunk
Commit 8ada7fa8bec576e4a8ce3d2adb6c88757dd3e2f175f23d38c6df018112b3c507
1 file changed +6 -4
+6 -4
--- src/forum.c
+++ src/forum.c
@@ -2019,17 +2019,19 @@
20192019
}
20202020
}
20212021
20222022
/*
20232023
** 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.
20262028
*/
20272029
static void forum_render_attachment_notice(void){
20282030
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>
20312033
}
20322034
}
20332035
20342036
/*
20352037
** WEBPAGE: forume1 hidden
20362038
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button