root/branches/release-26/tmpl/cms/dialog/refresh_templates.tmpl @ 1135

Revision 1135, 6.6 kB (checked in by bsmith, 2 years ago)

bugzid:65027 - Styling of Refresh Templates dialog

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<!--
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:setvarblock name="new_label"><__trans phrase="Apply a new template set"></mt:setvarblock>
71
72    <mtapp:setting
73        id="clean_start"
74        label="$new_label"
75        show_label="0"
76        show_hint="1"
77        hint="<__trans phrase="Deletes all existing templates and installs factory default template set.">"
78        label_class="top-label">
79
80        <div class="field-header">
81            <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>
82        </div>
83
84        <mt:if name="template_set_index" gt="1">
85        <select id="template_set" name="template_set" size="1" disabled="disabled">
86            <mt:loop name="template_set_loop">
87            <option value="<mt:var name="key" escape="html">" <mt:if name="selected">selected="selected"</mt:if>><mt:var name="label" escape="html"></option>
88            </mt:loop>
89        </select>
90        <mt:else>
91            <mt:loop name="template_set_loop">
92        <input type="hidden" name="template_set" value="<mt:var name="key" escape="html">" />
93            </mt:loop>
94        </mt:if>
95
96    </mtapp:setting>
97
98        <div>
99        <input type="checkbox" id="backup" name="backup" value="1" checked="checked" />
100        <label for="backup"><__trans phrase="Make backups of existing templates first"></label>
101        </div>
102
103        <div class="actions-bar">
104            <div class="actions-bar-inner pkg actions">
105                <button
106                    type="submit"
107                    accesskey="s"
108                    class="primary-button next"
109                    ><__trans phrase="Continue"></button>
110                <button
111                    onclick="closeDialog(); return false"
112                    type="submit"
113                    class="cancel"
114                    accesskey="x"
115                    title="<__trans phrase="Cancel (x)">"
116                    ><__trans phrase="Cancel"></button>
117            </div>
118        </div>
119
120    </div>
121
122    <div id="confirm-panel" class="hidden panel">
123        <div id="confirm-refresh">
124            <p><__trans phrase="You have requested to <strong>refresh the current template set</strong>. This action will:"></p>
125
126            <ul>
127                <li><__trans phrase="potentially install new templates"></li>
128                <li><__trans phrase="overwrite some existing templates with new template code"></li>
129                <li><__trans phrase="backups will be made of your templates and can be accessed through your backup filter"></li>
130            </ul>
131        </div>
132
133        <div id="confirm-clean" class="hidden">
134            <p><__trans phrase="You have requested to <strong>apply a new template set</strong>. This action will:"></p>
135
136            <ul>
137                <li><__trans phrase="delete all of the templates in your blog"></li>
138                <li><__trans phrase="install new templates from the selected template set"></li>
139                <li><__trans phrase="backups will be made of your templates and can be accessed through your backup filter"></li>
140            </ul>
141        </div>
142
143        <p><strong><__trans phrase="Are you sure you wish to continue?"></strong></p>
144
145        <div class="actions-bar">
146            <div class="actions-bar-inner pkg actions">
147                <button
148                    type="button"
149                    accesskey="s"
150                    class="primary-button close"
151                    ><__trans phrase="Confirm"></button>
152                <button
153                    onclick="closeDialog(); return false"
154                    type="submit"
155                    class="cancel"
156                    accesskey="x"
157                    title="<__trans phrase="Cancel (x)">"
158                    ><__trans phrase="Cancel"></button>
159                <!-- <button
160                    onclick="toggleHidden('confirm-panel'); toggleHidden('refresh-panel'); return false"
161                    type="submit"
162                    accesskey="b"
163                    title="<__trans phrase="Back (b)">"
164                    ><__trans phrase="Back"></button> -->
165            </div>
166        </div>
167
168    </div>
169
170</form>
171
172<mt:include name="dialog/footer.tmpl">
Note: See TracBrowser for help on using the browser.