diff --git a/combo/manager/static/js/combo.manager.js b/combo/manager/static/js/combo.manager.js index 2e77cfaf..2e286189 100644 --- a/combo/manager/static/js/combo.manager.js +++ b/combo/manager/static/js/combo.manager.js @@ -90,13 +90,16 @@ $(function() { data: $form.serialize(), type: 'POST', beforeSend: function() { $button.attr('disabled', 'disabled'); }, - success: function() { + success: function(data) { $button.attr('disabled', null); - $.getJSON($form.data('label-url'), + $button.parents('form').find('div.cell-form').html(data); + if (data.indexOf('class="errorlist"') == -1) { + $.getJSON($form.data('label-url'), function(data) { $form.parents('div.cell').find('.additional-label i').text(data['label']); } - ); + ); + } } }); return false; diff --git a/combo/manager/templates/combo/ajax_cell_form.html b/combo/manager/templates/combo/ajax_cell_form.html new file mode 100644 index 00000000..572164d0 --- /dev/null +++ b/combo/manager/templates/combo/ajax_cell_form.html @@ -0,0 +1 @@ +{{form.as_p}} diff --git a/combo/manager/templates/combo/cell_form.html b/combo/manager/templates/combo/cell_form.html index fcc115e8..9c8bc5d9 100644 --- a/combo/manager/templates/combo/cell_form.html +++ b/combo/manager/templates/combo/cell_form.html @@ -3,7 +3,9 @@