Commit 102e1ca9 authored by BaiJiangjie's avatar BaiJiangjie

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

parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment