jumpserver/templates/jasset/idc_edit.html

99 lines
3.7 KiB
HTML
Raw Normal View History

2015-04-20 02:12:11 +00:00
{% extends 'base.html' %}
{% block content %}
2015-12-19 09:26:34 +00:00
{% load bootstrap %}
2015-04-20 02:12:11 +00:00
{% include 'nav_cat_bar.html' %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
2015-12-19 09:26:34 +00:00
<div class="col-sm-10">
2015-04-20 02:12:11 +00:00
<div class="ibox float-e-margins">
<div id="ibox-content" class="ibox-title">
<h5> 填写IDC基本信息 </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>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">未启用 1</a>
</li>
<li><a href="#">未启用 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
{% if emg %}
<div class="alert alert-warning text-center">{{ emg }}</div>
{% endif %}
{% if smg %}
<div class="alert alert-success text-center">{{ smg }}</div>
{% endif %}
<form id="assetForm" method="post" class="form-horizontal">
2015-12-19 09:26:34 +00:00
{{ idc_form.name|bootstrap_horizontal }}
2015-04-20 02:12:11 +00:00
<div class="hr-line-dashed"></div>
2015-12-19 09:26:34 +00:00
{{ idc_form.bandwidth|bootstrap_horizontal }}
2015-04-20 02:12:11 +00:00
<div class="hr-line-dashed"></div>
2015-12-19 09:26:34 +00:00
{{ idc_form.operator|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ idc_form.linkman|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ idc_form.phone|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ idc_form.address|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ idc_form.network|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
{{ idc_form.comment|bootstrap_horizontal }}
2015-04-20 02:12:11 +00:00
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-5">
<button class="btn btn-white" type="submit"> 重置 </button>
<button class="btn btn-primary" type="sumbit"> 提交 </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
2015-12-19 09:26:34 +00:00
var required_fields = ["id_name"];
required_fields.forEach(function(field) {
$('label[for="' + field + '"]').parent().addClass("required");
});
$('#assetForm').validator({
timely: 2,
theme: "yellow_right_effect",
fields: {
"j_idc": {
rule: "required",
tip: "输入IDC名",
ok: "",
msg: {required: "IDC名必须填写!"},
data: {'data-ok':"主机名可以使用", 'data-msg-required': '主机名已正确'}
}
},
valid: function(form) {
form.submit();
2015-04-20 02:12:11 +00:00
}
2015-12-19 09:26:34 +00:00
});
2015-04-20 02:12:11 +00:00
</script>
{% endblock %}