diff options
Diffstat (limited to 'tpl/default/configure.html')
-rw-r--r-- | tpl/default/configure.html | 337 |
1 files changed, 228 insertions, 109 deletions
diff --git a/tpl/default/configure.html b/tpl/default/configure.html index 5820e6e4..2f54a085 100644 --- a/tpl/default/configure.html +++ b/tpl/default/configure.html | |||
@@ -1,121 +1,240 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head>{include="includes"}</head> | 3 | <head> |
4 | <body onload="document.configform.title.focus();"> | 4 | {include="includes"} |
5 | <div id="pageheader"> | 5 | </head> |
6 | {include="page.header"} | 6 | <body> |
7 | {$timezone_js} | 7 | {include="page.header"} |
8 | <form method="POST" action="#" name="configform" id="configform"> | ||
9 | <input type="hidden" name="token" value="{$token}"> | ||
10 | <table id="configuration_table"> | ||
11 | 8 | ||
12 | <tr> | 9 | {$ratioLabel='5-12'} |
13 | <td><b>Page title:</b></td> | 10 | {$ratioLabelMobile='7-8'} |
14 | <td><input type="text" name="title" id="title" size="50" value="{$title}"></td> | 11 | {$ratioInput='7-12'} |
15 | </tr> | 12 | {$ratioInputMobile='1-8'} |
16 | 13 | ||
17 | <tr> | 14 | <form method="POST" action="#" name="configform" id="configform"> |
18 | <td><b>Title link:</b></td> | 15 | <div class="pure-g"> |
19 | <td><input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"><br/><label | 16 | <div class="pure-u-lg-1-8 pure-u-1-24"></div> |
20 | for="titleLink">(default value is: ?)</label></td> | 17 | <div class="pure-u-lg-3-4 pure-u-22-24 page-form page-form-complete"> |
21 | </tr> | 18 | <h2 class="window-title">{'Configure'|t}</h2> |
22 | 19 | <div class="pure-g"> | |
23 | <tr> | 20 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> |
24 | <td><b>Theme:</b></td> | 21 | <div class="form-label"> |
25 | <td> | 22 | <label for="title"> |
26 | <select name="theme" id="theme"> | 23 | <span class="label-name">Shaarli {'title'|t}</span> |
27 | {loop="$theme_available"} | 24 | </label> |
28 | <option value="{$value}" {if="$value===$theme"}selected{/if}> | 25 | </div> |
29 | {$value|ucfirst} | 26 | </div> |
30 | </option> | 27 | <div class="pure-u-lg-7-12 pure-u-1"> |
31 | {/loop} | 28 | <div class="form-input"> |
32 | </select> | 29 | <input type="text" name="title" id="title" size="50" value="{$title}"> |
33 | </td> | 30 | </div> |
34 | </tr> | 31 | </div> |
35 | 32 | </div> | |
36 | <tr> | 33 | <div class="pure-g"> |
37 | <td><b>Timezone:</b></td> | 34 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> |
38 | <td>{$timezone_form}</td> | 35 | <div class="form-label"> |
39 | </tr> | 36 | <label for="titleLink"> |
40 | 37 | <span class="label-name">{'Title link'|t}</span><br> | |
41 | <tr> | 38 | <span class="label-desc">{'Default value'|t}: ?</span> |
42 | <td><b>Redirector</b></td> | 39 | </label> |
43 | <td> | 40 | </div> |
44 | <input type="text" name="redirector" id="redirector" size="50" value="{$redirector}"><br> | 41 | </div> |
45 | (e.g. <i>http://anonym.to/?</i> will mask the HTTP_REFERER) | 42 | <div class="pure-u-lg-{$ratioInput} pure-u-1"> |
46 | </td> | 43 | <div class="form-input"> |
47 | </tr> | 44 | <input type="text" name="titleLink" id="titleLink" size="50" value="{$titleLink}"> |
48 | 45 | </div> | |
49 | <tr> | 46 | </div> |
50 | <td><b>Security:</b></td> | 47 | </div> |
51 | <td> | 48 | <div class="pure-g"> |
52 | <input type="checkbox" name="disablesessionprotection" id="disablesessionprotection" | 49 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> |
50 | <div class="form-label"> | ||
51 | <label for="titleLink"> | ||
52 | <span class="label-name">{'Theme'|t}</span> | ||
53 | </label> | ||
54 | </div> | ||
55 | </div> | ||
56 | <div class="pure-u-lg-{$ratioInput} pure-u-1"> | ||
57 | <div class="form-input"> | ||
58 | <select name="theme" id="theme"> | ||
59 | {loop="$theme_available"} | ||
60 | <option value="{$value}" | ||
61 | {if="$value===$theme"} | ||
62 | selected="selected" | ||
63 | {/if} | ||
64 | > | ||
65 | {$value|ucfirst} | ||
66 | </option> | ||
67 | {/loop} | ||
68 | </select> | ||
69 | </div> | ||
70 | </div> | ||
71 | </div> | ||
72 | <div class="pure-g"> | ||
73 | <div class="pure-u-lg-{$ratioLabel} pure-u-1 "> | ||
74 | <div class="form-label"> | ||
75 | <label> | ||
76 | <span class="label-name">{'Timezone'|t}</span> | ||
77 | </label> | ||
78 | </div> | ||
79 | </div> | ||
80 | <div class="pure-u-lg-{$ratioInput} pure-u-1 "> | ||
81 | <div class="form-input"> | ||
82 | {ignore}FIXME! too hackish, needs to be fixed upstream{/ignore} | ||
83 | <div class="timezone" id="timezone-remove">{$timezone_form}</div> | ||
84 | <div class="timezone" id="timezone-add"></div> | ||
85 | </div> | ||
86 | </div> | ||
87 | </div> | ||
88 | <div class="pure-g"> | ||
89 | <div class="pure-u-lg-{$ratioLabel} pure-u-1 "> | ||
90 | <div class="form-label"> | ||
91 | <label for="redirector"> | ||
92 | <span class="label-name">{'Redirector'|t}</span><br> | ||
93 | <span class="label-desc">{'e. g.'|t} <i>http://anonym.to/?</i> {'will mask the HTTP_REFERER'|t}</span> | ||
94 | </label> | ||
95 | </div> | ||
96 | </div> | ||
97 | <div class="pure-u-lg-{$ratioInput} pure-u-1 "> | ||
98 | <div class="form-input"> | ||
99 | <input type="text" name="redirector" id="redirector" size="50" value="{$redirector}"> | ||
100 | </div> | ||
101 | </div> | ||
102 | </div> | ||
103 | <div class="clear"></div> | ||
104 | <div class="pure-g"> | ||
105 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} "> | ||
106 | <div class="form-label"> | ||
107 | <label for="disablesessionprotection"> | ||
108 | <span class="label-name">{'Disable session cookie hijacking protection'|t}</span><br> | ||
109 | <span class="label-desc"> | ||
110 | {'Check this if you get disconnected or if your IP address changes often'|t} | ||
111 | </span> | ||
112 | </label> | ||
113 | </div> | ||
114 | </div> | ||
115 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} "> | ||
116 | <div class="form-input"> | ||
117 | <input type="checkbox" name="disablesessionprotection" id="disablesessionprotection" | ||
53 | {if="$session_protection_disabled"}checked{/if}> | 118 | {if="$session_protection_disabled"}checked{/if}> |
54 | <label | 119 | </div> |
55 | for="disablesessionprotection"> Disable session cookie hijacking protection (Check this if you get | 120 | </div> |
56 | disconnected often or if your IP address changes often.)</label> | 121 | </div> |
57 | </td> | 122 | <div class="pure-g"> |
58 | </tr> | 123 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} "> |
59 | 124 | <div class="form-label"> | |
60 | <tr> | 125 | <label for="privateLinkByDefault"> |
61 | <td valign="top"><b>New link:</b></td> | 126 | <span class="label-name">{'Private links by default'|t}</span><br> |
62 | <td> | 127 | <span class="label-desc">{'All new links are private by default'|t}</span> |
63 | <input type="checkbox" name="privateLinkByDefault" id="privateLinkByDefault" | 128 | </label> |
64 | {if="$private_links_default"}checked{/if}/> | 129 | </div> |
65 | <label for="privateLinkByDefault"> | 130 | </div> |
66 | All new links are private by default | 131 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} "> |
67 | </label> | 132 | <div class="form-input"> |
68 | </td> | 133 | <input type="checkbox" name="privateLinkByDefault" id="privateLinkByDefault" |
69 | </tr> | 134 | {if="$private_links_default"}checked{/if}/> |
70 | <tr> | 135 | </div> |
71 | <td valign="top"><b>RSS direct links</b></td> | 136 | </div> |
72 | <td> | 137 | </div> |
73 | <input type="checkbox" name="enableRssPermalinks" id="enableRssPermalinks" | 138 | <div class="pure-g"> |
139 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile} "> | ||
140 | <div class="form-label"> | ||
141 | <label for="enableRssPermalinks"> | ||
142 | <span class="label-name">{'RSS direct links'|t}</span><br> | ||
143 | <span class="label-desc">{'Check this to use direct URL instead of permalink in feeds'|t}</span> | ||
144 | </label> | ||
145 | </div> | ||
146 | </div> | ||
147 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile} "> | ||
148 | <div class="form-input"> | ||
149 | <input type="checkbox" name="enableRssPermalinks" id="enableRssPermalinks" | ||
74 | {if="$enable_rss_permalinks"}checked{/if}/> | 150 | {if="$enable_rss_permalinks"}checked{/if}/> |
75 | <label for="enableRssPermalinks"> | 151 | </div> |
76 | Disable it to use permalinks in RSS feed instead of direct links to your shaared links. Currently <b> | 152 | </div> |
77 | {if="$enable_rss_permalinks"}enabled{else}disabled{/if}.</b> | 153 | </div> |
78 | </label> | 154 | <div class="pure-g"> |
79 | </td> | 155 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}"> |
80 | </tr> | 156 | <div class="form-label"> |
81 | <tr> | 157 | <label for="hidePublicLinks"> |
82 | <td valign="top"><b>Hide public links</b></td> | 158 | <span class="label-name">{'Hide public links'|t}</span><br> |
83 | <td> | 159 | <span class="label-desc">{'Do not show any links if the user is not logged in'|t}</span> |
84 | <input type="checkbox" name="hidePublicLinks" id="hidePublicLinks" | 160 | </label> |
85 | {if="$hide_public_links"}checked{/if}/> | 161 | </div> |
86 | <label for="hidePublicLinks"> Do not show any links if the user is not logged in.</label> | 162 | </div> |
87 | </td> | 163 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> |
88 | </tr> | 164 | <div class="form-input"> |
89 | <tr> | 165 | <input type="checkbox" name="hidePublicLinks" id="hidePublicLinks" |
90 | <td valign="top"><b>Update:</b></td> | 166 | {if="$hide_public_links"}checked{/if}/> |
91 | <td> | 167 | </div> |
92 | <input type="checkbox" name="updateCheck" id="updateCheck" | 168 | </div> |
169 | </div> | ||
170 | <div class="pure-g"> | ||
171 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}"> | ||
172 | <div class="form-label"> | ||
173 | <label for="hidePublicLinks"> | ||
174 | <span class="label-name">{'Check updates'|t}</span><br> | ||
175 | <span class="label-desc">{'Notify me when a new release is ready'|t}</span> | ||
176 | </label> | ||
177 | </div> | ||
178 | </div> | ||
179 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> | ||
180 | <div class="form-input"> | ||
181 | <input type="checkbox" name="updateCheck" id="updateCheck" | ||
93 | {if="$enable_update_check"}checked{/if}/> | 182 | {if="$enable_update_check"}checked{/if}/> |
94 | <label for="updateCheck"> Notify me when a new release is ready</label> | 183 | </div> |
95 | </td> | 184 | </div> |
96 | </tr> | 185 | </div> |
97 | <tr> | 186 | <div class="pure-g"> |
98 | <td valign="top"><b>Enable REST API</b></td> | 187 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}"> |
99 | <td> | 188 | <div class="form-label"> |
100 | <input type="checkbox" name="apiEnabled" id="apiEnabled" | 189 | <label for="apiEnabled"> |
190 | <span class="label-name">{'Enable REST API'|t}</span><br> | ||
191 | <span class="label-desc">{'Allow third party software to use Shaarli such as mobile application'|t}</span> | ||
192 | </label> | ||
193 | </div> | ||
194 | </div> | ||
195 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> | ||
196 | <div class="form-input"> | ||
197 | <input type="checkbox" name="apiEnabled" id="apiEnabled" | ||
101 | {if="$api_enabled"}checked{/if}/> | 198 | {if="$api_enabled"}checked{/if}/> |
102 | <label for="apiEnabled"> Allow third party software to use Shaarli such as mobile application.</label> | 199 | </div> |
103 | </td> | 200 | </div> |
104 | </tr> | 201 | </div> |
105 | <tr> | 202 | <div class="pure-g"> |
106 | <td valign="top"><b>API secret</b></td> | 203 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> |
107 | <td> | 204 | <div class="form-label"> |
108 | <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}" /> | 205 | <label for="apiSecret"> |
109 | </td> | 206 | <span class="label-name">{'API secret'|t}</span><br> |
110 | </tr> | 207 | </label> |
208 | </div> | ||
209 | </div> | ||
210 | <div class="pure-u-lg-{$ratioLabel} pure-u-1"> | ||
211 | <div class="form-input"> | ||
212 | <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}"> | ||
213 | </div> | ||
214 | </div> | ||
215 | </div> | ||
216 | <div class="center"> | ||
217 | <input type="submit" value="{'Save'|t}" name="save"> | ||
218 | </div> | ||
219 | </div> | ||
220 | </div> | ||
221 | <input type="hidden" name="token" value="{$token}"> | ||
222 | </form> | ||
111 | 223 | ||
112 | <tr> | ||
113 | <td></td> | ||
114 | <td class="right"><input type="submit" name="Save" value="Save config" class="bigbutton"></td> | ||
115 | </tr> | ||
116 | </table> | ||
117 | </form> | ||
118 | </div> | ||
119 | {include="page.footer"} | 224 | {include="page.footer"} |
225 | |||
226 | <script> | ||
227 | (function (window, document) { | ||
228 | var toRemove = document.getElementById('timezone-remove'); | ||
229 | var firstSelect = toRemove.getElementsByTagName('select')[0]; | ||
230 | var secondSelect = toRemove.getElementsByTagName('select')[1]; | ||
231 | toRemove.parentNode.removeChild(toRemove); | ||
232 | var toAdd = document.getElementById('timezone-add'); | ||
233 | var newTimezone = '<span class="timezone-continent">Continent ' + firstSelect.outerHTML + '</span>'; | ||
234 | newTimezone += ' <span class="timezone-country">Country ' + secondSelect.outerHTML + '</span>'; | ||
235 | toAdd.innerHTML = newTimezone; | ||
236 | })(this, this.document); | ||
237 | </script> | ||
120 | </body> | 238 | </body> |
121 | </html> | 239 | </html> |
240 | |||