Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Do not display post-action state in modal

Marcin Gębala8cda9dd23975
diff --git a/saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html b/saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html
index f2d1b0e64c..4d6ea7ce3b 100644
--- a/saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html
+++ b/saleor/dashboard/templates/dashboard/includes/modal_capture_refund.html
@@ -17,10 +17,6 @@
</div>
</form>
<p>{% trans "Before this action" %}</p>
- <ul>
- <li>{% trans "Captured amount: " %}{{ captured }} {{ currency }}</li>
- </ul>
- <p>{% trans "After this action" %}</p>
<ul>
<li>{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>
</ul>
@@ -35,21 +31,4 @@
$('#id_btn_yes').click(function() {
$('#modal-form').submit();
});
-$('#id_amount').change(function() {
- var action = $('#id_action').val();
- var amount = $('#id_amount').val();
- var captured = parseFloat(($('#id_captured').val()).replace(',', '.'));
-
- var new_captured = 0;
- if (action == 'capture') {
- new_captured = amount - captured;
- } else {
- new_captured = captured - amount;
- if (new_captured < 0) {
- new_captured = 0;
- }
- }
-
- $('#id_new_captured').text(new_captured.toFixed(2));
-});
</script>
\ No newline at end of file