@{
    string type = Request.QueryString["type"];
}
<div class="main">
    <form class=" form-group-sm form ui-validForm" method="post">
        <div class="form-group">
            <label class="control-label" for="name">原名称</label>
            <div class="controls">
                <input type="text" name="name" id="name" maxlength="50" value="@ViewBag.Name" class="form-control" readonly>
                <span class="help-block"></span>
            </div>
        </div>
        @if (type == "1")
        {
            <div class="form-group">
                <label class="control-label" for="name">新文件名</label>
                <div class="controls">
                    <input type="text" name="newFileName" id="newFileName" maxlength="50" data-validate="dataType:'file',nullMsg:'请填写新文件名!',errorMsg:'文件格式错误!'" class="form-control">
                    <span class="help-block">必须填写扩展名，如：newname.html</span>
                </div>
            </div>
        }
        else
        {
            <div class="form-group">
                <label class="control-label" for="name">新目录名</label>
                <div class="controls">
                    <input type="text" name="newDirectoryName" id="newDirectoryName" maxlength="50" data-validate="dataType:'string',nullMsg:'请填写新目录名!',errorMsg:'目录名格式错误!'" class="form-control">
                    <span class="help-block">必须填写扩展名，如：newname.html</span>
                </div>
            </div>
        }

        <div class="form-group postarea">
            <div class="controls">
                @Html.AntiForgeryToken()
                <input type="hidden" name="type" id="type" value="@type">
                <input type="hidden" name="path" id="path" value="@ViewBag.Path">
                <button type="button" class="btn btn-sm  btn-primary ui-pagePost" data-custom-params="url:'@Url.Action()',callBack:'PostCloseRefreshBack'">提交</button>
                <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
                <span class="help-block"></span>
            </div>
        </div>
    </form>
</div>

