bug #3272: Disable enter action in host creation form

This commit is contained in:
Daniel Molina committed 2015-01-19 16:11:18 +01:00
1 parent 9f7277ee08
commit fa7831965b
1 file changed
+8
@@ -1699,6 +1699,14 @@ function setupCreateHostDialog(){
$('input[name="custom_vnm_mad"]').parent().hide();
});
$('#create_host_form').on("keyup keypress", function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
e.preventDefault();
return false;
}
});
//Handle the form submission
$('#create_host_form',$create_host_dialog).submit(function(){
var name = $('#name',this).val();