File: import.tmpl

package info (click to toggle)
movabletype-opensource 4.2.3-1%2Blenny3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 21,268 kB
  • ctags: 15,862
  • sloc: perl: 178,892; php: 26,178; sh: 161; makefile: 82
file content (184 lines) | stat: -rw-r--r-- 7,334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<mt:setvarblock name="page_title"><__trans phrase="Import"></mt:setvarblock>
<$mt:setvar name="position_actions_bottom" value="1"$>
<mt:setvar name="import" value="1">
<MTSetVarBlock name="content_nav">
    <mt:include name="include/tools_content_nav.tmpl">
</MTSetVarBlock>
<mt:include name="include/header.tmpl">

<script type="text/javascript">
/* <![CDATA[ */
var last_shown;
function toggleDisplay(selection) {
    var id = 'config-' + selection.value;
    var div = getByID(id);
    if (div) {
        if (div.style.display != "block") {
            if (last_shown) {
                last_shown.style.display = "none";
            }
            div.style.display = "block";
            last_shown = div;
        } else {
            div.style.display = "none";
        }
    }
    return false;
}
function validate(f) {
    if (!f['blog_id'].value) {
        alert("<__trans phrase="You must select a blog to import." escape="js">");
        return false;
    }
    return true;
}
function selectBlog() {
    return openDialog(this.form, 'dialog_select_weblog', 'multi=0&amp;return_args=__mode%3Dstart_import');
}
/* ]]> */
</script>

<p class="page-desc"><__trans phrase="Transfer weblog entries into Movable Type from other Movable Type installations or even other blogging tools or export your entries to create a backup or copy."></p>

<div id="import-panel">

<form method="post" enctype="multipart/form-data" action="<mt:var name="script_url">" onsubmit="return validate(this)">
<input type="hidden" name="__mode" value="import" />
<input type="hidden" id="import_blog_id" name="blog_id" value="<mt:var name="blog_id" escape="html">" />
<input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />

<fieldset style="margin-top: 0px;">

    <mtapp:setting
        id="import_to"
        label="<__trans phrase="Import data into">"
        hint="<__trans phrase="Select a blog to import.">"
        content_class="field-content-text">
        <mt:if name="blog_id">
            <mt:var name="blog_name" escape="html"> (<mt:var name="blog_id" escape="html">)
        <mt:else>
            <a href="javascript:void(0)" onclick="return selectBlog()"><__trans phrase="Select blog"></a>
        </mt:if>
    </mtapp:setting>

<mt:if name="importer_loop">
    <mtapp:setting
        id="import_type"
        label="<__trans phrase="Importing from">">
<select name="import_type" onchange="return toggleDisplay(this)">
<mt:loop name="importer_loop">
<option value="<mt:var name="key" escape="html">"><mt:var name="label" escape="html"></option>
</mt:loop>
</select>
    </mtapp:setting>
<mt:loop name="importer_loop">
<div class="config" id="config-<mt:var name="key" escape="html">" style="display:none;">
<mt:var name="importer_options_html">
</div>
</mt:loop>
</mt:if>

<mt:if name="is_administrator">

    <mtapp:setting
        id="import_as_me"
        label="<__trans phrase="Ownership of imported entries">">
<p><input type="radio" id="import_as_me-on" name="import_as_me" value="1" <mt:if name="password_needed">onclick="hide('setpassworddiv');"</mt:if> checked="checked"> <label for="import_as_me"><__trans phrase="Import as me"></label> <a href="javascript:void(0)" onclick="return openManual('entry_import', 'import_as_me')" class="help-link">?</a></p>
<p><input type="radio" id="import_as_me-off" name="import_as_me" value="0" <mt:if name="password_needed">onclick="show('setpassworddiv');"</mt:if>> <label for="setpassword"><__trans phrase="Preserve original user"></label> <a href="javascript:void(0)" onclick="return openManual('entry_import', 'password')" class="help-link">?</a>
</p>

<mt:if name="password_needed">
<div id="setpassworddiv" style="display:none;">
<p><__trans phrase="If you choose to preserve the ownership of the imported entries and any of those users must be created in this installation, you must define a default password for those new accounts."></p>
<p class="field">
<label for="password"><__trans phrase="Default password for new users:"></label> <input type="password" name="password" id="password" />
</p>
</div>
</mt:if>
    </mtapp:setting>

<mt:else>

<p class="page-desc"><input type="hidden" name="import_as_me" value="1" />
<__trans phrase="You will be assigned the user of all imported entries.  If you wish the original user to keep ownership, you must contact your MT system administrator to perform the import so that new users can be created if necessary."></p>

</mt:if>

<mtapp:setting
    id="file"
    label="<__trans phrase="Upload import file (optional)">"
    hint="<__trans phrase="If your import file is located on your computer, you can upload it here.  Otherwise, Movable Type will automatically look in the 'import' folder of your Movable Type directory.">"
    help_page="entry_import"
    help_section="source_file">

<input name="file" id="file" type="file" />
    </mtapp:setting>

</mtapp:setting>


<div id="choose-destination">
<div class="spinner">
<p><a href="#bottom" onclick="return toggleActive('choose-destination')"><img src="<mt:var name="static_uri">images/spacer.gif" alt="" width="7" height="7" /></a> <a href="#bottom" onclick="return toggleActive('choose-destination')"><__trans phrase="More options"></a>
</p>
</div>

<div class="more-options">

    <mtapp:setting
        id="convert_breaks"
        label="<__trans phrase="Text Formatting">">
<select name="convert_breaks" id="convert_breaks">
<mt:loop name="text_filters">
<option value="<mt:var name="key" escape="html">"<mt:if name="selected"> selected="selected"</mt:if>><mt:var name="label" escape="html"></option>
</mt:loop>
</select>
    </mtapp:setting>

    <mtapp:setting
        id="encoding"
        label="<__trans phrase="Import File Encoding">"
        hint="<__trans phrase="By default, Movable Type will attempt to automatically detect the character encoding of your import file.  However, if you experience difficulties, you can set it explicitly.">"
        help_page="entry_import"
        help_section="source_file_encoding">
<p><select name="encoding" id="encoding">
<mt:loop name="encoding_names">
<option value="<mt:var name="name" escape="html">"><__trans phrase="<mt:var name="display_name" escape="html">"></option>
</mt:loop></select></p>
    </mtapp:setting>

    <mtapp:setting
        id="default_cat_id"
        label="<__trans phrase="Default category for entries (optional)">"
        hint="<__trans phrase="You can specify a default category for imported entries which have none assigned.">"
        help_page="entry_import"
        help_section="default_category_for_entries">
<select name="default_cat_id" id="default_cat_id">
<option value=""><__trans phrase="Select a category"></option>
<mt:loop name="category_loop">
<option value="<mt:var name="category_id" escape="html">"><mt:var name="category_label" escape="html"></option>
</mt:loop>
</select>
    </mtapp:setting>

</div>

</div>

<mt:setvarblock name="action_buttons">
    <button
        type="submit"
        accesskey="s"
        title="<__trans phrase="Import Entries (s)">"
        class="primary-button"
        ><__trans phrase="Import Entries"></button>
</mt:setvarblock>
<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">

</fieldset>
</form>

</div>
<div id="bottom"></div>

<mt:include name="include/footer.tmpl">