File: edit_folder.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 (124 lines) | stat: -rw-r--r-- 4,734 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
<mt:setvar name="page_title" value="<__trans phrase="Edit Folder">">
<$mt:setvar name="position_actions_bottom" value="1"$>
<MTSetVarBlock name="system_msg">
    <mt:if name="error">
        <mtapp:statusmsg
            id="generic-error"
            class="error">
            <mt:var name="error">
        </mtapp:statusmsg>
    </mt:if>
    <mt:if name="saved">
        <mtapp:statusmsg
            id="saved"
            class="success"
            rebuild="all">
            <__trans phrase="Your folder changes have been made.">
        </mtapp:statusmsg>
    </mt:if>
</MTSetVarBlock>
<mt:setvarblock name="related_content">
    <mtapp:widget
        id="useful-links"
        label="<__trans phrase="Useful links">">
        <ul>
            <li><a href="<mt:var name="script_url">?__mode=list_cat&amp;_type=folder&amp;blog_id=<$mt:var name="blog_id" escape="url"$>"><__trans phrase="Manage Folders"></a></li>
            <li><a href="<mt:var name="script_url">?__mode=list_page&amp;blog_id=<$mt:var name="blog_id" escape="url"$>&amp;filter=category_id&amp;filter_val=<$mt:var name="id" escape="url"$>"><__trans phrase="Manage pages in this folder"></a></li>
        </ul>
    </mtapp:widget>
</mt:setvarblock>
<mt:include name="include/header.tmpl">

<script type="text/javascript">
/* <![CDATA[ */
function validate(form) {    
    if (form.label.value.match(/\S/,''))
        return true;
    alert('<__trans phrase="You must specify a label for the folder." escape="singlequotes">');
    form.label.focus();
    return false;
}
 
function toggleFile() {
    var fld = getByID("basename");
    if (fld) {
        fld.disabled = false;
        fld.focus();
        var baseman = getByID("basename_manual");
        if (baseman) baseman.value = "1";
        var basewarn = getByID("basename-warning");
        if (basewarn) basewarn.style.display = "block";
    }
    var img = getByID("basename-lock");
    if (img)
        img.style.display = 'none';
    return false;
}

var tableSelect;
function init()
{
    // setup
    tableSelect = new TC.TableSelect( "selector" );
    tableSelect.rowSelect = true;
}
TC.attachLoadEvent( init );
/* ]]> */
</script>

<div id="folder-details-content">

    <form method="post" action="<mt:var name="script_url">" onsubmit="return validate(this)">
        <input type="hidden" name="blog_id" value="<mt:var name="blog_id">" />
        <input type="hidden" name="__mode" value="save" />
        <input type="hidden" name="_type" value="<mt:var name="object_type">" />
        <input type="hidden" name="id" value="<mt:var name="id" escape="html">" />
        <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
        <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />
        <input type="hidden" name="folder_parent" value="<mt:var name="parent" escape="html">" />

        <mtapp:setting
            id="label"
            label="<__trans phrase="Label">"
            help_page="folders"
            help_section="folder_label">
            <div class="textarea-wrapper">
                <input name="label" id="label" maxlength="100" value="<mt:var name="label" escape="html">" class="full-width" />
            </div>
        </mtapp:setting>

        <mtapp:setting
            id="basename"
            label="<__trans phrase="Path">"
            help_page="folders"
            help_section="folder_path">
            <input type="hidden" name="basename_manual" id="basename_manual" value="0" />
            <input type="hidden" name="basename_old" id="basename_old" value="<mt:var name="basename_old" escape="html">" />

            <$mt:var name="path_prefix" escape="html"$><input name="basename" id="basename" maxlength="250" value="<mt:var name="basename" escape="html">" class="quarter-width" onchange="setElementValue('basename', dirify(this.value))" style="float: none;" />
        </mtapp:setting>

        <mtapp:setting
            id="description"
            label="<__trans phrase="Description">"
            help_page="folders"
            help_section="folder_description">
            <textarea name="description" id="description" rows="" cols="" class="full-width short"><mt:var name="description" escape="html"></textarea>
        </mtapp:setting>

<mt:setvarblock name="action_buttons">
    <button
        type="submit"
        accesskey="s"
        title="<__trans phrase="Save changes to this folder (s)">"
        class="primary-button"
        ><__trans phrase="Save Changes"></button>
</mt:setvarblock>
<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">
</form>

</div>

<$MTApp:PageActions$>

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