root/branches/release-36/tmpl/cms/dialog/refresh_templates.tmpl @ 2046

Revision 2046, 7.1 kB (checked in by bsmith, 19 months ago)

bugzid:64661 - hide backup message when backup option is de-selected

Line 
1<mt:var
2    name="page_title"
3    value="<__trans phrase="Refresh Template Set">">
4
5<mt:setvarblock name="html_head" append="1">
6<script type="text/javascript" src="<mt:var name="static_uri">js/dialog.js"></script>
7<script type="text/javascript">
8/* <![CDATA[ */
9function enable(id) {
10    var el = getByID(id);
11    if (el)
12        el.disabled = false;
13}
14function disable(id) {
15    var el = getByID(id);
16    if (el)
17        el.disabled = true;
18}
19var dialog;
20var panels;
21function dialog_closed(ok) {
22    if (ok) {
23        // fill out form and submit to create the association
24        var frm = getByID("refresh_form");
25        frm.submit();
26    } else {
27        closeDialog();
28    }
29}
30function init() {
31    dialog = new Dialog.MultiPanel("refresh");
32    panels = [];
33    var panel;
34    panel = new ListingPanel("refresh");
35    panels[panels.length] = panel;
36    panel = new ListingPanel("confirm");
37    panels[panels.length] = panel;
38    dialog.setPanels(panels);
39    dialog.open({}, dialog_closed);
40}
41TC.attachLoadEvent(init);
42/* ]]> */
43</script>
44</mt:setvarblock>
45
46<mt:include name="dialog/header.tmpl">
47
48<form name="refresh_form" id="refresh_form" method="post" action="<mt:var name="script_url">" target="_top" onsubmit="return false">
49    <input type="hidden" name="__mode" value="refresh_all_templates" />
50    <input type="hidden" name="blog_id" value="<mt:var name="blog_id">" />
51    <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />
52    <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
53
54    <div id="refresh-panel" class="hidden panel">
55
56    <mt:setvarblock name="refresh_label"><mt:loop name="template_set_loop"><mt:if name="selected"><__trans phrase="Refresh [_1] template set" params="<mt:var name="label" escape="html">"></mt:if></mt:loop></mt:setvarblock>
57
58    <mtapp:setting
59        id="refresh_templates"
60        label="$refresh_label"
61        label_class="top-label"
62        show_label="0"
63        show_hint="1"
64        hint="<__trans phrase="Updates current templates while retaining any user-created or user-modified templates.">">
65        <div class="field-header">
66            <label for="refresh_type_refresh"><input type="radio" name="refresh_type" id="refresh_type_refresh" value="refresh" onclick="disable('template_set');toggleHidden('confirm-clean');toggleHidden('confirm-refresh');" checked="checked" /> <$mt:var name="refresh_label"$></label>
67        </div>
68    </mtapp:setting>
69
70    <mt:if name="template_set_count" gt="1">
71    <mt:setvarblock name="new_label"><__trans phrase="Apply a new template set"></mt:setvarblock>
72    <mt:setvarblock name="new_hint"><__trans phrase="Deletes all existing templates and install the selected template set."></mt:setvarblock>
73    <mt:else>
74    <mt:setvarblock name="new_label"><__trans phrase="Reset to factory defaults"></mt:setvarblock>
75    <mt:setvarblock name="new_hint"><__trans phrase="Deletes all existing templates and installs factory default template set."></mt:setvarblock>
76    </mt:if>
77
78    <mtapp:setting
79        id="clean_start"
80        label="$new_label"
81        show_label="0"
82        show_hint="1"
83        hint="$new_hint"
84        label_class="top-label">
85
86        <div class="field-header">
87            <label for="refresh_type_clean"><input type="radio" name="refresh_type" id="refresh_type_clean" value="clean" onclick="enable('template_set');toggleHidden('confirm-refresh');toggleHidden('confirm-clean');" /> <$mt:var name="new_label"$></label>
88        </div>
89
90        <mt:if name="template_set_count" gt="1">
91        <select id="template_set" name="template_set" size="1" disabled="disabled">
92            <mt:loop name="template_set_loop">
93            <option value="<mt:var name="key" escape="html">" <mt:if name="selected">selected="selected"</mt:if>><mt:var name="label" escape="html"></option>
94            </mt:loop>
95        <mt:else>
96            <mt:loop name="template_set_loop">
97            <input type="hidden" name="template_set" value="<mt:var name="key" escape="html">" />
98            </mt:loop>
99        </mt:if>
100        </select>
101
102    </mtapp:setting>
103
104
105        <div>
106        <input type="checkbox" id="backup" name="backup" value="1" checked="checked" onclick="toggleHidden('backups-message-refresh');toggleHidden('backups-message-clean');" />
107        <label for="backup"><__trans phrase="Make backups of existing templates first"></label>
108        </div>
109
110        <div class="actions-bar">
111            <div class="actions-bar-inner pkg actions">
112                <button
113                    type="submit"
114                    accesskey="s"
115                    class="primary-button next"
116                    ><__trans phrase="Continue"></button>
117                <button
118                    onclick="closeDialog(); return false"
119                    type="submit"
120                    class="cancel"
121                    accesskey="x"
122                    title="<__trans phrase="Cancel (x)">"
123                    ><__trans phrase="Cancel"></button>
124            </div>
125        </div>
126
127    </div>
128
129    <div id="confirm-panel" class="hidden panel">
130        <div id="confirm-refresh">
131            <p><__trans phrase="You have requested to <strong>refresh the current template set</strong>. This action will:"></p>
132
133            <ul>
134                <li><__trans phrase="potentially install new templates"></li>
135                <li><__trans phrase="overwrite some existing templates with new template code"></li>
136                <li id="backups-message-refresh"><__trans phrase="backups will be made of your templates and can be accessed through your backup filter"></li>
137            </ul>
138        </div>
139
140        <div id="confirm-clean" class="hidden">
141            <p><__trans phrase="You have requested to <strong>apply a new template set</strong>. This action will:"></p>
142
143            <ul>
144                <li><__trans phrase="delete all of the templates in your blog"></li>
145                <li><__trans phrase="install new templates from the selected template set"></li>
146                <li id="backups-message-clean"><__trans phrase="backups will be made of your templates and can be accessed through your backup filter"></li>
147            </ul>
148        </div>
149
150        <p><strong><__trans phrase="Are you sure you wish to continue?"></strong></p>
151
152        <div class="actions-bar">
153            <div class="actions-bar-inner pkg actions">
154                <button
155                    type="button"
156                    accesskey="s"
157                    class="primary-button close"
158                    ><__trans phrase="Confirm"></button>
159                <button
160                    onclick="closeDialog(); return false"
161                    type="submit"
162                    class="cancel"
163                    accesskey="x"
164                    title="<__trans phrase="Cancel (x)">"
165                    ><__trans phrase="Cancel"></button>
166                <!-- <button
167                    onclick="toggleHidden('confirm-panel'); toggleHidden('refresh-panel'); return false"
168                    type="submit"
169                    accesskey="b"
170                    title="<__trans phrase="Back (b)">"
171                    ><__trans phrase="Back"></button> -->
172            </div>
173        </div>
174
175    </div>
176
177</form>
178
179<mt:include name="dialog/footer.tmpl">
Note: See TracBrowser for help on using the browser.