2015-04-20 02:12:11 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% load mytags %}
|
2015-12-19 09:26:34 +00:00
|
|
|
{% block self_head_css_js %}
|
|
|
|
<link href="/static/css/plugins/datepicker/datepicker3.css" rel="stylesheet">
|
|
|
|
<link href="/static/css/plugins/chosen/chosen.css" rel="stylesheet">
|
|
|
|
<script src="/static/js/plugins/chosen/chosen.jquery.js"></script>
|
|
|
|
{% endblock %}
|
2015-04-20 02:12:11 +00:00
|
|
|
{% block content %}
|
|
|
|
{% include 'nav_cat_bar.html' %}
|
|
|
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeIn">
|
|
|
|
<div class="row">
|
2015-12-19 09:26:34 +00:00
|
|
|
<div class="col-sm-12">
|
2015-04-20 02:12:11 +00:00
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<div class="ibox-title">
|
|
|
|
<h5>下载文件</h5>
|
|
|
|
<div class="ibox-tools">
|
|
|
|
<a class="collapse-link">
|
|
|
|
<i class="fa fa-chevron-up"></i>
|
|
|
|
</a>
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
</a>
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ibox-content">
|
2015-12-19 09:26:34 +00:00
|
|
|
<form id="downForm" class="form-horizontal" method="post">
|
|
|
|
{% if error %}
|
|
|
|
<div class="alert alert-warning text-center">{{ error }}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if msg %}
|
|
|
|
<div class="alert alert-success text-center">{{ msg }}</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="file_path" class="col-sm-2 control-label">文件路径<span class="red-fonts">*</span></label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="file_path" name="file_path" placeholder="File Path" type="text" class="form-control">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="user" class="col-sm-2 control-label">选择主机<span class="red-fonts">*</span></label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select name="asset_ids" id="asset_ids" data-placeholder="请输入" class="chosen-select form-control m-b" multiple tabindex="2">
|
|
|
|
{% for asset in assets %}
|
|
|
|
<option value="{{ asset.id }}">{{ asset.hostname }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-4 col-sm-offset-2">
|
|
|
|
<button class="btn btn-white" type="reset">取消</button>
|
|
|
|
<button id="submit_button" class="btn btn-primary" type="submit">下载</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2015-04-20 02:12:11 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-19 09:26:34 +00:00
|
|
|
{% endblock %}
|
2015-04-20 02:12:11 +00:00
|
|
|
|
2015-12-19 09:26:34 +00:00
|
|
|
{% block self_footer_js %}
|
|
|
|
<script>
|
|
|
|
var config = {
|
|
|
|
'.chosen-select' : {},
|
|
|
|
'.chosen-select-deselect' : {allow_single_deselect:true},
|
|
|
|
'.chosen-select-no-single' : {disable_search_threshold:10},
|
|
|
|
'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
|
|
|
|
'.chosen-select-width' : {width:"95%"}
|
|
|
|
};
|
2015-04-20 02:12:11 +00:00
|
|
|
|
2015-12-19 09:26:34 +00:00
|
|
|
for (var selector in config) {
|
|
|
|
$(selector).chosen(config[selector]);
|
|
|
|
}
|
|
|
|
</script>
|
2015-04-20 02:12:11 +00:00
|
|
|
{% endblock %}
|