From c8572907e60ebddd9be03b2289240ffba7dc8efa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:26:31 +0000 Subject: [PATCH 1/4] Initial plan From 8cc4059554f6bf5a62c6f5b4c7d792adc8fa22b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:31:58 +0000 Subject: [PATCH 2/4] Add copy button to publisher-finish-payout view Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com> --- .../staff/publisher-payout-finish.html | 72 ++++++++++++++++++- adserver/tests/test_staff_actions.py | 3 + 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/adserver/templates/adserver/staff/publisher-payout-finish.html b/adserver/templates/adserver/staff/publisher-payout-finish.html index afe9b032..8c172abc 100644 --- a/adserver/templates/adserver/staff/publisher-payout-finish.html +++ b/adserver/templates/adserver/staff/publisher-payout-finish.html @@ -19,6 +19,14 @@

{% block heading %}{% trans 'Finish Payout' %}{% endblock heading %}

+
+
{% trans 'Payout Details' %}
+ +
+
{% trans 'Publisher' %}
{{ payout.publisher }}
@@ -30,7 +38,7 @@

{% block heading %}{% trans 'Finish Payout' %}{% endblock heading %}

{% if payout.publisher.paypal_email %}
{% trans 'User' %}
-
+
{{ payout.publisher.paypal_email }}
{% endif %} @@ -39,10 +47,10 @@

{% block heading %}{% trans 'Finish Payout' %}{% endblock heading %}

{{ payout.get_status_display }}
{% trans 'Amount' %}
-
${{ payout.amount|floatformat:2|intcomma }}
+
${{ payout.amount|floatformat:2|intcomma }}
{% trans 'Subject' %}
-
{% trans "EthicalAds Payout" %} - {{ payout.publisher.name }}
+
{% trans "EthicalAds Payout" %} - {{ payout.publisher.name }}
{% trans 'Action' %}
@@ -85,4 +93,62 @@

{% block heading %}{% trans 'Finish Payout' %}{% endblock heading %}

+ + {% endblock content_container %} diff --git a/adserver/tests/test_staff_actions.py b/adserver/tests/test_staff_actions.py index 4bfb29b5..343c02e4 100644 --- a/adserver/tests/test_staff_actions.py +++ b/adserver/tests/test_staff_actions.py @@ -383,6 +383,9 @@ def test_finish_view(self): self.assertEqual(finish_response.status_code, 200) self.assertContains(finish_response, self.payout3.get_status_display()) self.assertContains(finish_response, "$99") + # Verify copy button is present + self.assertContains(finish_response, 'id="copy-payout-info"') + self.assertContains(finish_response, 'Copy Info') post_response = self.client.post(finish_url) self.assertEqual(post_response.status_code, 302) From 07ef3ecc48daf6967c511b86ea5bb44cfa6ca04f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:37:19 +0000 Subject: [PATCH 3/4] Refactor copy button JavaScript to reduce duplication Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com> --- .../staff/publisher-payout-finish.html | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/adserver/templates/adserver/staff/publisher-payout-finish.html b/adserver/templates/adserver/staff/publisher-payout-finish.html index 8c172abc..3abae7b0 100644 --- a/adserver/templates/adserver/staff/publisher-payout-finish.html +++ b/adserver/templates/adserver/staff/publisher-payout-finish.html @@ -95,6 +95,9 @@
{% trans 'Payout Details' %}
diff --git a/adserver/tests/test_staff_actions.py b/adserver/tests/test_staff_actions.py index 343c02e4..8a28b19b 100644 --- a/adserver/tests/test_staff_actions.py +++ b/adserver/tests/test_staff_actions.py @@ -383,9 +383,10 @@ def test_finish_view(self): self.assertEqual(finish_response.status_code, 200) self.assertContains(finish_response, self.payout3.get_status_display()) self.assertContains(finish_response, "$99") - # Verify copy button is present - self.assertContains(finish_response, 'id="copy-payout-info"') - self.assertContains(finish_response, 'Copy Info') + # Verify individual copy buttons are present + self.assertContains(finish_response, 'class="copy-btn"') + self.assertContains(finish_response, 'data-copy-target="payout-amount"') + self.assertContains(finish_response, 'data-copy-target="payout-subject"') post_response = self.client.post(finish_url) self.assertEqual(post_response.status_code, 302)