root/branches/release-36/tmpl/cms/cfg_archives.tmpl @ 2065

Revision 2065, 16.9 kB (checked in by bsmith, 19 months ago)

bugzid:79289 - Publishing Settings: Missing/broken form labels

  • Property svn:keywords set to Author Date Id Revision
Line 
1<mt:setvar name="page_title" value="<__trans phrase="Publishing Settings">">
2<$mt:setvar name="position_actions_bottom" value="1"$>
3<mt:setvar name="publishing" value="1">
4<mt:setvarblock name="system_msg">
5
6    <mt:if name="error">
7        <mtapp:statusmsg
8            id="error"
9            class="error">
10            <mt:var name="error">
11        </mtapp:statusmsg>
12    </mt:if>
13
14    <mt:if name="no_writedir">
15        <mtapp:statusmsg
16            id="no-writedir"
17            class="error">
18            <__trans phrase="Error: Movable Type was not able to create a directory for publishing your blog. If you create this directory yourself, assign sufficient permissions that allow Movable Type to create files within it.">
19        </mtapp:statusmsg>
20    <mt:else>
21
22    <mt:if name="no_cachedir">
23        <mtapp:statusmsg
24            id="no-cachedir"
25            class="error">
26            <__trans phrase="Error: Movable Type was not able to create a directory to cache your dynamic templates. You should create a directory called <code>[_1]</code> underneath your blog directory." params="templates_c">
27        </mtapp:statusmsg>
28    <mt:else>
29
30    <mt:if name="no_writecache">
31        <mtapp:statusmsg
32            id="no-writecache"
33            class="error">
34            <__trans phrase="Error: Movable Type cannot write to the template cache directory. Please check the permissions for the directory called <code>[_1]</code> underneath your blog directory." params="templates_c">
35        </mtapp:statusmsg>
36    <mt:else>
37
38    <mt:if name="no_cache_path">
39        <mtapp:statusmsg
40            id="no-cache-path"
41            class="error">
42            <__trans phrase="Error: Movable Type was not able to create a directory to cache your dynamic templates. You should create a directory called <code>[_1]</code> underneath your blog directory." params="cache">
43        </mtapp:statusmsg>
44    <mt:else>
45
46    <mt:if name="no_write_cache_path">
47        <mtapp:statusmsg
48            id="no-write-cache-path"
49            class="error">
50            <__trans phrase="Error: Movable Type cannot write to the template cache directory. Please check the permissions for the directory called <code>[_1]</code> underneath your blog directory." params="cache">
51        </mtapp:statusmsg>
52
53    <mt:else>
54
55    <mt:if name="saved">
56        <mt:if name="archives_changed">
57            <mtapp:statusmsg
58                id="saved"
59                class="success"
60                rebuild="all">
61                <__trans phrase="Your blog's archive configuration has been saved.">
62            </mtapp:statusmsg>
63        <mt:else>
64            <mtapp:statusmsg
65                id="saved"
66                class="success">
67                <__trans phrase="Your blog's archive configuration has been saved.">
68            </mtapp:statusmsg>
69        </mt:if>
70    </mt:if>
71    </mt:if>
72    </mt:if>
73    </mt:if>
74    </mt:if>
75
76    <mt:if name="saved_added">
77        <mtapp:statusmsg
78            id="saved"
79            class="success"
80            rebuild="all">
81            <__trans phrase="You have successfully added a new archive-template association.">
82            <mt:if name="archives_changed">
83                <__trans phrase="You may need to update your 'Master Archive Index' template to account for your new archive configuration.">
84            </mt:if>
85            <mt:if name="saved_deleted">
86                <__trans phrase="The selected archive-template associations have been deleted.">
87            </mt:if>
88        </mtapp:statusmsg>
89    </mt:if>
90    </mt:if>
91</mt:setvarblock>
92<mt:setvarblock name="content_nav">
93    <mt:include name="include/cfg_content_nav.tmpl">
94</mt:setvarblock>
95<mt:setvarblock name="html_head" append="1">
96<script type="text/javascript" src="<mt:var name="static_uri">js/tc/client.js"></script>
97<script type="text/javascript">
98/* <![CDATA[ */
99function validate (f) {
100    if (!f.site_path.value) {
101        alert('<__trans phrase="You must set your Local Site Path." escape="singlequotes">');
102        return false;
103    } else if (!is_valid_url(f.site_url.value)){
104        alert('<__trans phrase="You must set a valid Site URL." escape="singlequotes">');
105        return false;
106    } else if (!is_valid_path(f.site_path.value)){
107        alert('<__trans phrase="You must set a valid Local Site Path." escape="singlequotes">');
108        return false;
109    }
110    f.site_url.disabled = false;
111    f.site_path.disabled = false;
112    f.archive_path.disabled = false;
113    f.archive_url.disabled = false;
114    return true;
115}
116function is_valid_url(url_){
117    return url_.match( /^https?:\/\/[A-Za-z0-9!$%()=_.:,;@~-]+/ );
118}
119function is_valid_path(path_){
120    for(i = 0; i < path_.length; i++){
121        var buf = escape(path_.substr(i, 1));
122        if (buf.match(/^%u.*/)){
123            return false;
124        }
125        if (buf.match(/(%.{2}){2}?/)){
126                return false;
127        }
128    }
129    return true;
130}
131
132function disableFields(path1,path2) {
133    var url_is = "<mt:var name="site_url" encode_js="1">";
134    var path_is = "<mt:var name="site_path" encode_js="1">";
135    if (url_is.match(/BLOG-NAME/)) {
136        var daURL = getByID(path1);
137        var lock = path1 +"-lock";
138        var lock_img = getByID(lock);
139        daURL.disabled = false;
140        lock_img.style.display = 'none';
141    }
142    if (path_is.match(/BLOG-NAME/)) {
143        var daPath = getByID(path2);
144        var lock = path2 +"-lock";
145        var lock_img = getByID(lock);
146        daPath.disabled = false;
147        lock_img.style.display = 'none';
148    }
149    return;
150}
151
152function toggleFile(path) {
153    var fld = getByID(path);
154    if (fld) {
155        fld.disabled = false;
156        fld.focus();
157        var which_warning = path + "-warning";
158        var urlwarn = getByID(which_warning);
159        if (urlwarn) urlwarn.style.display = "block";
160    }
161    var which_lock = path + "-lock";
162    var img = getByID(which_lock);
163    if (img)
164        img.style.display = 'none';
165    return false;
166}
167
168function init() {
169    // conditionally disables
170    disableFields('site_url','site_path');
171}
172
173TC.attachLoadEvent( init );
174/* ]]> */
175</script>
176</mt:setvarblock>
177
178<mt:include name="include/header.tmpl">
179
180<div id="cfg-archives">
181
182<form name="cfg_form" id="cfg_form" method="post" action="<mt:var name="script_url">"<mt:if name="can_set_publish_paths">  onsubmit="return validate(this)"</mt:if>>
183<input type="hidden" name="blog_id" value="<mt:var name="blog_id">" />
184<input type="hidden" name="__mode" value="save" />
185<input type="hidden" name="_type" value="blog" />
186<input type="hidden" name="id" value="<mt:var name="blog_id">" />
187<input type="hidden" name="cfg_screen" value="cfg_archives" />
188<input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
189<input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />
190
191<mt:if name="can_set_publish_paths">
192<fieldset>
193    <h3><__trans phrase="Publishing Paths"></h3>
194
195    <mtapp:setting
196        id="site_url"
197        label="<__trans phrase="Site URL">"
198        hint="<__trans phrase="The URL of your website. Do not include a filename (i.e. exclude index.html). Example: http://www.example.com/blog/">"
199        show_hint="1"
200        help_page="blog_settings_publishing"
201        help_section="site_url">
202        <input name="site_url" id="site_url" <mt:if name="site_url">disabled="disabled"</mt:if> value="<mt:var name="site_url" escape="html" default="$suggested_site_url">" size="50" /><mt:if name="site_url"> <a href="javascript:void(0)" title="<__trans phrase="Unlock this blog&rsquo;s site URL for editing">" onclick="return toggleFile('site_url')"><img src="<mt:var name="static_uri">images/locked.gif" alt="Site URL Lock" id="site_url-lock" height="14" width="14" /></a></mt:if>
203
204        <p class="alert-warning-inline icon-left icon-warning" id="site_url-warning" style="display: none"><__trans phrase="Warning: Changing the site URL can result in breaking all the links in your blog."></p>
205    </mtapp:setting>
206
207    <mtapp:setting
208        id="site_path"
209        label="<__trans phrase="Site Root">"
210        hint="<__trans phrase="The path where your index files will be published. An absolute path (starting with '/') is preferred, but you can also use a path relative to the Movable Type directory. Example: /home/melody/public_html/blog">"
211        show_hint="1"
212        help_page="blog_settings_publishing"
213        help_section="site_root">
214        <input name="site_path" id="site_path" <mt:if name="site_path">disabled="disabled"</mt:if> value="<mt:var name="site_path" escape="html" default="$suggested_site_path">" size="50" /><mt:if name="site_path"> <a href="javascript:void(0)" title="<__trans phrase="Unlock this blog&rsquo;s site path for editing">" onclick="return toggleFile('site_path')"><img src="<mt:var name="static_uri">images/locked.gif" alt="Site Root Lock" id="site_path-lock" height="14" width="14" /></a></mt:if>
215
216        <p class="alert-warning-inline icon-left icon-warning" id="site_path-warning" style="display: none"><__trans phrase="Note: Changing your site root requires a complete publish of your site."></p>
217    </mtapp:setting>
218
219    <mtapp:setting
220        id="enable_archive_paths"
221        label="<__trans phrase="Advanced Archive Publishing">"
222        content_class="field-content-text"
223        show_label="0"
224        hint="<__trans phrase="Select this option only if you need to publish your archives outside of your Site Root.">"
225        help_page="blog_settings_publishing"
226        help_section="advanced_archive_publishing">
227            <input type="checkbox" name="enable_archive_paths" id="enable_archive_paths" value="1" onclick="toggleSubPrefs(this); return true"<mt:if name="enable_archive_paths"> checked="checked"</mt:if> class="cb" /> <label for="enable_archive_paths"><__trans phrase="Publish archives outside of Site Root"></label>
228    </mtapp:setting>
229
230    <div id="enable_archive_paths_prefs"<mt:unless name="enable_archive_paths"> class="hidden"</mt:unless>>
231
232    <mtapp:setting
233        id="archive_url"
234        label="<__trans phrase="Archive URL">"
235        hint="<__trans phrase="Enter the URL of the archives section of your website. Example: http://archives.example.com/">"
236        show_hint="1"
237        help_page="blog_settings_publishing"
238        help_section="archive_url">
239        <input name="archive_url" id="archive_url" <mt:if name="archive_url">disabled="disabled"</mt:if> value="<$mt:var name="archive_url" escape="html"$>" size="50" />
240        <mt:if name="archive_url">
241            <a href="javascript:void(0)" title="<__trans phrase="Unlock this blog&rsquo;s archive url for editing">" onclick="return toggleFile('archive_url')"><img src="<mt:var name="static_uri">images/locked.gif" alt="Archive URL Lock" id="archive_url-lock" height="14" width="14" /></a>
242            <p class="alert-warning-inline icon-left icon-warning" id="archive_url-warning" style="display: none"><__trans phrase="Warning: Changing the archive URL can result in breaking all the links in your blog."></p>
243        </mt:if>
244    </mtapp:setting>
245
246    <mtapp:setting
247        id="archive_path"
248        label="<__trans phrase="Archive Root">"
249        hint="<__trans phrase="Enter the path where your archive files will be published. Example: /home/melody/public_html/archives">"
250        show_hint="1"
251        help_page="blog_settings_publishing"
252        help_section="archive_path">
253            <input name="archive_path" id="archive_path" <mt:if name="archive_path">disabled="disabled"</mt:if> value="<mt:var name="archive_path" escape="html">" size="50" />
254            <mt:if name="archive_path">
255                <a href="javascript:void(0)" title="<__trans phrase="Unlock this blog&rsquo;s site path for editing">" onclick="return toggleFile('archive_path')"><img src="<mt:var name="static_uri">images/locked.gif" alt="Archive Path Lock" id="archive_path-lock" height="14" width="14" /></a>
256                <p class="alert-warning-inline icon-left icon-warning" id="archive_path-warning" style="display: none"><__trans phrase="Warning: Changing the archive path can result in breaking all the links in your blog."></p>
257            </mt:if>
258    </mtapp:setting>
259
260    </div>
261
262</fieldset>
263</mt:if>
264
265<mt:ignore>
266    <!-- to be enabled at a later date -->
267
268<mt:if name="can_use_publish_queue">
269
270<fieldset>
271    <h3><__trans phrase="Asynchronous Job Queue"></h3>
272
273<mtapp:setting
274    id="publish_queue"
275    label="<__trans phrase="Use Publishing Queue">"
276    content_class="field-content-text"
277    help_page="blog_settings_publishing"
278    help_section="publish_queue"
279    show_label="0"
280    show_hint="1"
281    hint="<__trans phrase="Requires the use of a cron job to publish pages in the background.">">
282    <input id="publish_queue" type="checkbox" name="publish_queue" value="1" <mt:if name="publish_queue"> checked="checked"</mt:if>/>
283    <label for="publish_queue"><__trans phrase="Use background publishing queue for publishing static pages for this blog"></label>
284</mtapp:setting>
285
286</fieldset>
287
288</mt:if>
289
290</mt:ignore>
291
292
293<mt:unless name="hide_build_option">
294<mt:if name="dynamic_enabled">
295<fieldset>
296    <h3><__trans phrase="Dynamic Publishing Options"></h3>
297
298    <mtapp:setting
299        id="dynamic_publishing_options"
300        label="<__trans phrase="Dynamic Publishing Options">"
301        show_label="0">
302    <ul>
303        <li>
304            <input type="checkbox" id="dynamic_cache" name="dynamic_cache" <mt:if name="dynamic_caching">checked="checked"</mt:if>/>
305            <label for="dynamic_cache"><__trans phrase="Enable dynamic cache"></label>
306        </li>
307        <li>
308            <input type="checkbox" id="dynamic_conditional" name="dynamic_conditional" <mt:if name="dynamic_conditional">checked="checked"</mt:if>/>
309            <label for="dynamic_conditional"><__trans phrase="Enable conditional retrieval"></label>
310        </li>
311    </ul>
312    </mtapp:setting>
313
314</fieldset>
315</mt:if>
316</mt:unless>
317
318<fieldset>
319    <h3><__trans phrase="Archive Options"></h3>
320
321<mtapp:setting
322    id="file_extension"
323    label="<__trans phrase="File Extension">"
324    hint="<__trans phrase="Enter the archive file extension. This can take the form of 'html', 'shtml', 'php', etc. Note: Do not enter the leading period ('.').">"
325    help_page="blog_setting_publishing"
326    help_section="archive_file_extension">
327    <input name="file_extension" id="file_extension" size="5" value="<mt:var name="file_extension" escape="html">" />
328</mtapp:setting>
329
330<mtapp:setting
331    id="preferred_archive_type"
332    label="<__trans phrase="Preferred Archive">"
333    hint="<__trans phrase="Used for creating links to an archived entry (permalink). Select from the archive types used in this blogs archive templates.">"
334    show_hint="1"
335    help_page="blog_settings_publishing"
336    help_section="preferred_archive_type">
337
338    <mt:loop name="entry_archive_types">
339        <mt:if name="__first__">
340    <select name="preferred_archive_type" id="preferred_archive_type">
341        </mt:if>
342        <option value="<mt:var name="archive_type" escape="html">"<mt:if name="archive_type_is_preferred"> selected="selected"</mt:if>><mt:var name="archive_type_translated" escape="html"></option>
343        <mt:if name="__last__">
344    </select>
345        </mt:if>
346    </mt:loop>
347    <mt:unless name="entry_archive_types">
348    <p><span class="alert-warning-inline"><__trans phrase="No archives are active"></span></p>
349    </mt:unless>
350</mtapp:setting>
351
352</fieldset>
353
354<fieldset>
355    <h3><__trans phrase="Module Options"></h3>
356
357<mtapp:setting
358    id="include_cache"
359    label="<__trans phrase="Module Caching">"
360    content_class="field-content-text"
361    help_page="blog_settings_publishing"
362    help_section="include_cache">
363    <input id="include_cache" type="checkbox" name="include_cache" value="1"<mt:if name="include_cache"> checked="checked"</mt:if>/> <label for="include_cache"><__trans phrase="Enable template module caching"></label>
364</mtapp:setting>
365
366<mtapp:setting
367    id="include_system"
368    label="<__trans phrase="Server Side Includes">"
369    content_class="field-content-text"
370    help_page="blog_settings_publishing"
371    help_section="ssi">
372    <select id="include_system" name="include_system">
373      <option value=""<mt:unless name="include_system"> selected="selected"</mt:unless>><__trans phrase="None (disabled)"></option>
374      <option value="php"<mt:if name="include_system" eq="php"> selected="selected"</mt:if>><__trans phrase="PHP Includes"></option>
375      <option value="shtml"<mt:if name="include_system" eq="shtml"> selected="selected"</mt:if>><__trans phrase="Apache Server-Side Includes"></option>
376      <option value="asp"<mt:if name="include_system" eq="asp"> selected="selected"</mt:if>><__trans phrase="Active Server Page Includes"></option>
377      <option value="jsp"<mt:if name="include_system" eq="jsp"> selected="selected"</mt:if>><__trans phrase="Java Server Page Includes"></option>
378    </select>
379</mtapp:setting>
380
381</fieldset>
382
383
384<mt:setvarblock name="action_buttons">
385    <button
386        type="submit"
387        accesskey="s"
388        title="<__trans phrase="Save changes to these settings (s)">"
389        class="primary-button"
390        ><__trans phrase="Save Changes"></button>
391</mt:setvarblock>
392<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">
393</form>
394
395</div>
396
397<mt:include name="include/footer.tmpl">
Note: See TracBrowser for help on using the browser.