From 6b9455b0dac2da6450589eb1f81822763305b8c7 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Wed, 24 Jan 2024 17:29:10 -0400 Subject: [PATCH] feat(appellate): Adds the new button for filers to the single doc page --- src/appellate/appellate.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/appellate/appellate.js b/src/appellate/appellate.js index cdd09cc2..9cab4969 100644 --- a/src/appellate/appellate.js +++ b/src/appellate/appellate.js @@ -396,7 +396,20 @@ AppellateDelegate.prototype.handleCombinedPdfPageView = async function () { // If this page offers a single document, intercept navigation to the document view page. AppellateDelegate.prototype.handleSingleDocumentPageView = async function () { - overwriteFormSubmitMethod(); + if (PACER.hasFilingCookie(document.cookie)) { + let button = createRecapButtonForFilers('Accept Charges and RECAP Document'); + button.addEventListener('click', (event) => { + event.preventDefault(); + let form = event.target.parentNode; + form.id = 'form' + new Date().getTime(); + window.postMessage({ id: form.id }, '*'); + }); + + let form = document.querySelector('form'); + form.append(button); + } else { + overwriteFormSubmitMethod(); + } this.pacer_case_id = await APPELLATE.getCaseId(this.tabId, this.queryParameters, this.docId);