From a3861cc38e3ce8be39f6b9173c399240e097f1ff Mon Sep 17 00:00:00 2001 From: Michael Simon <simon@kit.edu> Date: Wed, 16 Jun 2021 06:56:08 +0200 Subject: [PATCH] probably changed behavior with print on primefaces update Needed to put a outputPanel around printed content. The p:dialog was printed with position, ie. the content was off printing paper. closes #105 --- bwreg-webapp/src/main/webapp/user/twofa.xhtml | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/bwreg-webapp/src/main/webapp/user/twofa.xhtml b/bwreg-webapp/src/main/webapp/user/twofa.xhtml index f7b0c1982..25b75d848 100644 --- a/bwreg-webapp/src/main/webapp/user/twofa.xhtml +++ b/bwreg-webapp/src/main/webapp/user/twofa.xhtml @@ -142,19 +142,21 @@ <p:dialog header="#{messages.twofa_tokentype_tanlist}" width="240" widgetVar="showBackupTanDlg" id="showBackupTanId" modal="true" closable="true" closeOnEscape="true" showEffect="fade" hideEffect="fade"> - <div style="margin-bottom: 8px;"> - <h:outputText value="#{messages.twofa_backup_tan_list_values}" /> - </div> - <ul style="margin-bottom: 16px;"> - <ui:repeat var="key" value="#{twoFaUserBean.backupTanList.result.value.otp.keySet()}"> - <li style="margin-bottom: 4px;"> - <b><h:outputText value="#{key}" /></b> - - <h:outputText value="#{twoFaUserBean.backupTanList.result.value.otp.get(key)}" /> - </li> - </ui:repeat> - </ul> + <p:outputPanel id="showBackupTanIdPrintBox"> + <div style="margin-bottom: 8px;"> + <h:outputText value="#{messages.twofa_backup_tan_list_values}" /> + </div> + <ul style="margin-bottom: 16px;"> + <ui:repeat var="key" value="#{twoFaUserBean.backupTanList.result.value.otp.keySet()}"> + <li style="margin-bottom: 4px;"> + <b><h:outputText value="#{key}" /></b> - + <h:outputText value="#{twoFaUserBean.backupTanList.result.value.otp.get(key)}" /> + </li> + </ui:repeat> + </ul> + </p:outputPanel> <p:commandButton value="Print" type="button" style="margin-bottom: 16px"> - <p:printer target="showBackupTanId" /> + <p:printer target="showBackupTanIdPrintBox" /> </p:commandButton> </p:dialog> -- GitLab