zkConfigCenterImport.jsp 1.77 KB
<%@page language="java" contentType="text/html;charset=utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<form method="post" class="form-horizontal" id="zkImportForm" name="zkImportForm" enctype="multipart/form-data">
    <input type="hidden" name="ip" id="ip">
    <div class="form-group">
        <label class="col-sm-2 control-label">名称:</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" id="name" name="name" maxlength="30" size="40" readonly="readonly"/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">路径:</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" id="root" name="root" readonly="readonly"/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">文件:</label>
        <div class="col-sm-8">
        <input id="file" name="file" type="file" style="display:none">
        <div class="input-append">
            <input id="filepath" class="input-large" type="text" style="height:30px;" readonly="readonly">
            <a class="btn" onclick="$('input[id=file]').click();">选择</a>
        </div>
        </div>
    </div>
    
    <div id="tip" style="color:red;font-size: 16px; text-align: center;">上传文件格式必须为.properties</div>
</form>
<script>
$(function(){
	$("#zkImportForm #name").val(paramObj.name);
	$("#zkImportForm #root").val(paramObj.root);

    $('input[id=file]').change(function() {
        $('#filepath').val($(this).val());
    });
})
</script>