提交 102e1ca9 编写于 作者: B BaiJiangjie

[Bugfix] 创建资产,资产系统置上,RDP:3389

上级 2823d027
......@@ -15,9 +15,9 @@
{% csrf_token %}
<h3>{% trans 'Basic' %}</h3>
{% bootstrap_field form.hostname layout="horizontal" %}
{% bootstrap_field form.platform layout="horizontal" %}
{% bootstrap_field form.ip layout="horizontal" %}
{% bootstrap_field form.port layout="horizontal" %}
{% bootstrap_field form.platform layout="horizontal" %}
{% bootstrap_field form.public_ip layout="horizontal" %}
{% bootstrap_field form.domain layout="horizontal" %}
......@@ -85,6 +85,17 @@ $(document).ready(function () {
allowClear: true,
templateSelection: format
});
$("#id_platform").change(function (){
var platform = $("#id_platform option:selected").text();
var port = 22;
if(platform === 'Windows'){
port = 3389;
}
if(platform === 'Other'){
port = null;
}
$("#id_port").val(port);
});
})
</script>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册