Skip to content

Commit

Permalink
Merge pull request #211 from gushil/main-OC-22363-fix-double-date-print
Browse files Browse the repository at this point in the history
Hide date widget fake input when rendering pdf
  • Loading branch information
svadla-oc authored Aug 23, 2024
2 parents 04cc5c8 + 1ac64de commit 0aa7fe5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/enketo-core/src/widget/text-print/text-print.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ class TextPrintWidget extends Widget {
this.element.after(printElement);
this.element.classList.add('print-hide');

// If previous element is a fake input in date widget, hide it as well
const previousElement = this.element.previousElementSibling;
if (
previousElement !== null &&
previousElement.classList.contains('date')
) {
previousElement.classList.add('print-hide');
}

this.widget = this.element.parentElement.querySelector(
`.${className}`
);
Expand Down

0 comments on commit 0aa7fe5

Please sign in to comment.