Commit a67187d1 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Handled issue where the port form was submitted on Enter keyup

parent 6663a783
<script type="text/javascript">
$(document).ready(function(){
$("#add_port_form").unbind('submit');
$("#add_port_form").submit(function(){
$("#port_diag").parents('.ui-dialog').first().find('.ui-button').first().click();
return false;
});
});
</script>
<form id="add_port_form" method="POST">
{% csrf_token %}
<table>
<tr><th>Port</th><td>{{ form.port }}<span class="error" id='rl_error'>{{ form.port.errors|join:", " }}</span></td></tr>
</table>
</form>
\ No newline at end of file
</form>
......@@ -65,7 +65,6 @@
autoOpen: false,
buttons: {
'Add': function() {
console.log($("#add_port_form").serialize());
$.ajax({
url:"{% url add-port %}",
data:$("#add_port_form").serialize(),
......
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