🎨 Replace deprecated “language” attribute
[Sone.git] / src / main / resources / templates / options.html
1 <%include include/head.html>
2
3         <script type="application/javascript">
4                 $(document).ready(function() {
5                         getTranslation("WebInterface.DefaultText.Option.InsertionDelay", function(insertionDelayDefaultText) {
6                                 registerInputTextareaSwap("#sone #options input[name=insertion-delay]", insertionDelayDefaultText, "insertion-delay", true, true);
7                         });
8                         getTranslation("WebInterface.DefaultText.Option.PostsPerPage", function(postsPerPageText) {
9                                 registerInputTextareaSwap("#sone #options input[name=posts-per-page]", postsPerPageText, "posts-per-page", true, true);
10                         });
11                         getTranslation("WebInterface.DefaultText.Option.ImagesPerPage", function(imagesPerPageText) {
12                                 registerInputTextareaSwap("#sone #options input[name=images-per-page]", imagesPerPageText, "images-per-page", true, true);
13                         });
14                         getTranslation("WebInterface.DefaultText.Option.CharactersPerPost", function(postsPerPageText) {
15                                 registerInputTextareaSwap("#sone #options input[name=characters-per-post]", postsPerPageText, "characters-per-post", true, true);
16                         });
17                         getTranslation("WebInterface.DefaultText.Option.PostCutOffLength", function(postCutOffLengthText) {
18                                 registerInputTextareaSwap("#sone #options input[name=post-cut-off-length]", postCutOffLengthText, "post-cut-off-length", true, true);
19                         });
20                         getTranslation("WebInterface.DefaultText.Option.PositiveTrust", function(positiveTrustText) {
21                                 registerInputTextareaSwap("#sone #options input[name=positive-trust]", positiveTrustText, "positive-trust", true, true);
22                         });
23                         getTranslation("WebInterface.DefaultText.Option.NegativeTrust", function(negativeTrustText) {
24                                 registerInputTextareaSwap("#sone #options input[name=negative-trust]", negativeTrustText, "negative-trust", true, true);
25                         });
26                         getTranslation("WebInterface.DefaultText.Option.TrustComment", function(trustCommentText) {
27                                 registerInputTextareaSwap("#sone #options input[name=trust-comment]", trustCommentText, "trust-comment", true, true);
28                         });
29                 });
30         </script>
31
32         <h1><%= Page.Options.Page.Title|l10n|html></h1>
33
34         <p><%= Page.Options.Page.Description|l10n|html></p>
35
36         <form id="options" method="post">
37                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
38
39                 <h2><%= Page.Options.Section.SoneSpecificOptions.Title|l10n|html></h2>
40
41                 <%ifnull currentSone>
42                         <p><%= Page.Options.Section.SoneSpecificOptions.NotLoggedIn|l10n|html|replace needle=="{link}" replacement=='<a href="login.html">'|replace needle=="{/link}" replacement=='</a>'></p>
43                 <%else>
44                         <p><%= Page.Options.Section.SoneSpecificOptions.LoggedIn|l10n|html></p>
45                 <%/if>
46
47                 <p>
48                         <input type="checkbox" name="auto-follow"<%ifnull currentSone> disabled="disabled"<%/if><%if auto-follow> checked="checked"<%/if> />
49                         <%= Page.Options.Option.AutoFollow.Description|l10n|html>
50                 </p>
51
52                 <p>
53                         <input type="checkbox" name="enable-sone-insert-notifications"<%ifnull currentSone> disabled="disabled"<%/if><%if enable-sone-insert-notifications> checked="checked"<%/if> />
54                         <%= Page.Options.Option.EnableSoneInsertNotifications.Description|l10n|html>
55                 </p>
56
57                 <p>
58                         <input type="checkbox" name="show-notification-new-sones"<%ifnull currentSone> disabled="disabled"<%/if><%if show-notification-new-sones> checked="checked"<%/if>/>
59                         <%= Page.Options.Option.ShowNotificationNewSones.Description|l10n|html>
60                 </p>
61
62                 <p>
63                         <input type="checkbox" name="show-notification-new-posts"<%ifnull currentSone> disabled="disabled"<%/if><%if show-notification-new-posts> checked="checked"<%/if>/>
64                         <%= Page.Options.Option.ShowNotificationNewPosts.Description|l10n|html>
65                 </p>
66
67                 <p>
68                         <input type="checkbox" name="show-notification-new-replies"<%ifnull currentSone> disabled="disabled"<%/if><%if show-notification-new-replies> checked="checked"<%/if>/>
69                         <%= Page.Options.Option.ShowNotificationNewReplies.Description|l10n|html>
70                 </p>
71
72                 <h2><%= Page.Options.Section.AvatarOptions.Title|l10n|html></h2>
73
74                 <p><%= Page.Options.Option.ShowAvatars.Description|l10n|html></p>
75
76                 <ul>
77                         <li>
78                                 <input type="radio" name="show-custom-avatars" value="NEVER"<%if show-custom-avatars|match value==NEVER> checked="checked"<%/if>/>
79                                 <%=Page.Options.Option.ShowAvatars.Never.Description|l10n|html>
80                         </li>
81                         <li>
82                                 <input type="radio" name="show-custom-avatars" value="FOLLOWED"<%if show-custom-avatars|match value==FOLLOWED> checked="checked"<%/if>/>
83                                 <%=Page.Options.Option.ShowAvatars.Followed.Description|l10n|html>
84                         </li>
85                         <li>
86                                 <input type="radio" name="show-custom-avatars" value="MANUALLY_TRUSTED"<%if show-custom-avatars|match value==MANUALLY_TRUSTED> checked="checked"<%/if>/>
87                                 <%=Page.Options.Option.ShowAvatars.ManuallyTrusted.Description|l10n|html>
88                         </li>
89                         <li>
90                                 <input type="radio" name="show-custom-avatars" value="TRUSTED"<%if show-custom-avatars|match value==TRUSTED> checked="checked"<%/if>/>
91                                 <%=Page.Options.Option.ShowAvatars.Trusted.Description|l10n|html>
92                         </li>
93                         <li>
94                                 <input type="radio" name="show-custom-avatars" value="ALWAYS"<%if show-custom-avatars|match value==ALWAYS> checked="checked"<%/if>/>
95                                 <%=Page.Options.Option.ShowAvatars.Always.Description|l10n|html>
96                         </li>
97                 </ul>
98
99                 <h2><%= Page.Options.Section.LoadLinkedImagesOptions.Title|l10n|html></h2>
100
101                 <p><%= Page.Options.Option.LoadLinkedImages.Description|l10n|html></p>
102
103                 <ul>
104                         <li>
105                                 <input type="radio" name="load-linked-images" value="NEVER"<%if load-linked-images|match value==NEVER> checked="checked"<%/if>/>
106                                 <%=Page.Options.Option.LoadLinkedImages.Never.Description|l10n|html>
107                         </li>
108                         <li>
109                                 <input type="radio" name="load-linked-images" value="FOLLOWED"<%if load-linked-images|match value==FOLLOWED> checked="checked"<%/if>/>
110                                 <%=Page.Options.Option.LoadLinkedImages.Followed.Description|l10n|html>
111                         </li>
112                         <li>
113                                 <input type="radio" name="load-linked-images" value="MANUALLY_TRUSTED"<%if load-linked-images|match value==MANUALLY_TRUSTED> checked="checked"<%/if>/>
114                                 <%=Page.Options.Option.LoadLinkedImages.ManuallyTrusted.Description|l10n|html>
115                         </li>
116                         <li>
117                                 <input type="radio" name="load-linked-images" value="TRUSTED"<%if load-linked-images|match value==TRUSTED> checked="checked"<%/if>/>
118                                 <%=Page.Options.Option.LoadLinkedImages.Trusted.Description|l10n|html>
119                         </li>
120                         <li>
121                                 <input type="radio" name="load-linked-images" value="ALWAYS"<%if load-linked-images|match value==ALWAYS> checked="checked"<%/if>/>
122                                 <%=Page.Options.Option.LoadLinkedImages.Always.Description|l10n|html>
123                         </li>
124                 </ul>
125
126                 <h2><%= Page.Options.Section.RuntimeOptions.Title|l10n|html></h2>
127
128                 <p><%= Page.Options.Option.InsertionDelay.Description|l10n|html></p>
129                 <%if =insertion-delay|in collection=fieldErrors>
130                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
131                 <%/if>
132                 <p><input type="text" name="insertion-delay" value="<% insertion-delay|html>" /></p>
133
134                 <p><%= Page.Options.Option.PostsPerPage.Description|l10n|html></p>
135                 <%if =posts-per-page|in collection=fieldErrors>
136                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
137                 <%/if>
138                 <p><input type="text" name="posts-per-page" value="<% posts-per-page|html>" /></p>
139
140                 <p><%= Page.Options.Option.ImagesPerPage.Description|l10n|html></p>
141                 <%if =images-per-page|in collection=fieldErrors>
142                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
143                 <%/if>
144                 <p><input type="text" name="images-per-page" value="<% images-per-page|html>" /></p>
145
146                 <p><%= Page.Options.Option.CharactersPerPost.Description|l10n|html></p>
147                 <%if =characters-per-post|in collection=fieldErrors>
148                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
149                 <%/if>
150                 <p><input type="text" name="characters-per-post" value="<% characters-per-post|html>" /></p>
151
152                 <p><%= Page.Options.Option.PostCutOffLength.Description|l10n|html></p>
153                 <%if =post-cut-off-length|in collection=fieldErrors>
154                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
155                 <%/if>
156                 <p><input type="text" name="post-cut-off-length" value="<% post-cut-off-length|html>" /></p>
157
158                 <p>
159                         <input type="checkbox" name="require-full-access"<%if require-full-access> checked="checked"<%/if> />
160                         <%= Page.Options.Option.RequireFullAccess.Description|l10n|html></p>
161                 </p>
162
163                 <h2><%= Page.Options.Section.TrustOptions.Title|l10n|html></h2>
164
165                 <p><%= Page.Options.Option.PositiveTrust.Description|l10n|html></p>
166                 <%if =positive-trust|in collection=fieldErrors>
167                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
168                 <%/if>
169                 <p><input type="text" name="positive-trust" value="<% positive-trust|html>" /></p>
170
171                 <p><%= Page.Options.Option.NegativeTrust.Description|l10n|html></p>
172                 <%if =negative-trust|in collection=fieldErrors>
173                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
174                 <%/if>
175                 <p><input type="text" name="negative-trust" value="<% negative-trust|html>" /></p>
176
177                 <p><%= Page.Options.Option.TrustComment.Description|l10n|html></p>
178                 <p><input type="text" name="trust-comment" value="<% trust-comment|html>" /></p>
179
180                 <h2><%= Page.Options.Section.FcpOptions.Title|l10n|html></h2>
181
182                 <p><input type="checkbox" name="fcp-interface-active"<%if fcp-interface-active> checked="checked"<%/if> /> <%= Page.Options.Option.FcpInterfaceActive.Description|l10n|html></p>
183
184                 <p>
185                         <%= Page.Options.Option.FcpFullAccessRequired.Description|l10n|html|replace needle=="{link}" replacement=='<a href="/config/fcp">'|replace needle=="{/link}" replacement=='</a>'>
186                         <select name="fcp-full-access-required">
187                                 <option value="0"<%if fcp-full-access-required|match value=="0"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.No|l10n|html></option>
188                                 <option value="1"<%if fcp-full-access-required|match value=="1"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Writing|l10n|html></option>
189                                 <option value="2"<%if fcp-full-access-required|match value=="2"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Always|l10n|html></option>
190                         </select>
191                 </p>
192
193                 <p><button type="submit"><%= Page.Options.Button.Save|l10n|html></button></p>
194
195         </form>
196
197 <%include include/tail.html>