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