zkConfigCenterImport.jsp
1.77 KB
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
<%@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>