Make option to enable Sone insert notifications editable.
[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.PositiveTrust", function(positiveTrustText) {
15                                 registerInputTextareaSwap("#sone #options input[name=positive-trust]", positiveTrustText, "positive-trust", true, true);
16                         });
17                         getTranslation("WebInterface.DefaultText.Option.NegativeTrust", function(negativeTrustText) {
18                                 registerInputTextareaSwap("#sone #options input[name=negative-trust]", negativeTrustText, "negative-trust", true, true);
19                         });
20                         getTranslation("WebInterface.DefaultText.Option.TrustComment", function(trustCommentText) {
21                                 registerInputTextareaSwap("#sone #options input[name=trust-comment]", trustCommentText, "trust-comment", true, true);
22                         });
23                 });
24         </script>
25
26         <h1><%= Page.Options.Page.Title|l10n|html></h1>
27
28         <p><%= Page.Options.Page.Description|l10n|html></p>
29
30         <form id="options" method="post">
31                 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
32
33                 <h2><%= Page.Options.Section.SoneSpecificOptions.Title|l10n|html></h2>
34
35                 <%ifnull currentSone>
36                         <p><%= Page.Options.Section.SoneSpecificOptions.NotLoggedIn|l10n|html|replace needle="{link}" replacement='<a href="login.html">'|replace needle="{/link}" replacement='</a>'></p>
37                 <%else>
38                         <p><%= Page.Options.Section.SoneSpecificOptions.LoggedIn|l10n|html></p>
39                 <%/if>
40
41                 <p>
42                         <input type="checkbox" name="auto-follow"<%ifnull currentSone> disabled="disabled"<%/if><%if auto-follow> checked="checked"<%/if> />
43                         <%= Page.Options.Option.AutoFollow.Description|l10n|html>
44                 </p>
45
46                 <p>
47                         <input type="checkbox" name="enable-sone-insert-notifications"<%ifnull currentSone> disabled="disabled"<%/if><%if enable-sone-insert-notifications> checked="checked"<%/if> />
48                         <%= Page.Options.Option.EnableSoneInsertNotifications.Description|l10n|html>
49                 </p>
50
51                 <h2><%= Page.Options.Section.RuntimeOptions.Title|l10n|html></h2>
52
53                 <p><%= Page.Options.Option.InsertionDelay.Description|l10n|html></p>
54                 <%if =insertion-delay|in collection=fieldErrors>
55                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
56                 <%/if>
57                 <p><input type="text" name="insertion-delay" value="<% insertion-delay|html>" /></p>
58
59                 <p><%= Page.Options.Option.PostsPerPage.Description|l10n|html></p>
60                 <%if =posts-per-page|in collection=fieldErrors>
61                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
62                 <%/if>
63                 <p><input type="text" name="posts-per-page" value="<% posts-per-page|html>" /></p>
64
65                 <p><%= Page.Options.Option.CharactersPerPost.Description|l10n|html></p>
66                 <%if =characters-per-post|in collection=fieldErrors>
67                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
68                 <%/if>
69                 <p><input type="text" name="characters-per-post" value="<% characters-per-post|html>" /></p>
70
71                 <p>
72                         <input type="checkbox" name="require-full-access"<%if require-full-access> checked="checked"<%/if> />
73                         <%= Page.Options.Option.RequireFullAccess.Description|l10n|html></p>
74                 </p>
75
76                 <h2><%= Page.Options.Section.TrustOptions.Title|l10n|html></h2>
77
78                 <p><%= Page.Options.Option.PositiveTrust.Description|l10n|html></p>
79                 <%if =positive-trust|in collection=fieldErrors>
80                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
81                 <%/if>
82                 <p><input type="text" name="positive-trust" value="<% positive-trust|html>" /></p>
83
84                 <p><%= Page.Options.Option.NegativeTrust.Description|l10n|html></p>
85                 <%if =negative-trust|in collection=fieldErrors>
86                         <p class="warning"><%= Page.Options.Warnings.ValueNotChanged|l10n|html></p>
87                 <%/if>
88                 <p><input type="text" name="negative-trust" value="<% negative-trust|html>" /></p>
89
90                 <p><%= Page.Options.Option.TrustComment.Description|l10n|html></p>
91                 <p><input type="text" name="trust-comment" value="<% trust-comment|html>" /></p>
92
93                 <h2><%= Page.Options.Section.FcpOptions.Title|l10n|html></h2>
94
95                 <p><input type="checkbox" name="fcp-interface-active"<%if fcp-interface-active> checked="checked"<%/if> /> <%= Page.Options.Option.FcpInterfaceActive.Description|l10n|html></p>
96
97                 <p>
98                         <%= Page.Options.Option.FcpFullAccessRequired.Description|l10n|html|replace needle="{link}" replacement='<a href="/config/fcp">'|replace needle="{/link}" replacement='</a>'>
99                         <select name="fcp-full-access-required">
100                                 <option value="0"<%if fcp-full-access-required|match value="0"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.No|l10n|html></option>
101                                 <option value="1"<%if fcp-full-access-required|match value="1"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Writing|l10n|html></option>
102                                 <option value="2"<%if fcp-full-access-required|match value="2"> selected="selected"<%/if>><%= Page.Options.Option.FcpFullAccessRequired.Value.Always|l10n|html></option>
103                         </select>
104                 </p>
105
106                 <h2><%= Page.Options.Section.Cleaning.Title|l10n|html></h2>
107
108                 <p><%= Page.Options.Option.ClearOnNextRestart.Description|l10n|html|replace needle="{strong}" replacement="<strong>"|replace needle="{/strong}" replacement="</strong>"></p>
109                 <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>
110
111                 <p><%= Page.Options.Option.ReallyClearOnNextRestart.Description|l10n|html|replace needle="{strong}" replacement="<strong>"|replace needle="{/strong}" replacement="</strong>"></p>
112                 <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>
113
114                 <p><button type="submit"><%= Page.Options.Button.Save|l10n|html></button></p>
115
116         </form>
117
118 <%include include/tail.html>