New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IP-925]: Preview pdf in modal #944
base: development
Are you sure you want to change the base?
[IP-925]: Preview pdf in modal #944
Conversation
Added code to implement the feature: Show quote/invoice pdf in modal if Options menu setting 'Preview PDF' is active.
Added code to implement the feature: Show quote/invoice pdf in modal (for table view) if Options menu setting 'Preview PDF' is active.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Although I have reviewed the pr, I want @naui95 and @nielsdrost7 to take a look and to perform the merge. |
We'll guide you through this on slack. Second thing: |
I haven't looked into the PR, but are you introducing a setting? Does that mean a database change? |
…odal-InvoicePlane#925" This reverts commit f6ca2df, reversing changes made to 70bac8c.
…PDF-in-Modal-InvoicePlane#925"" This reverts commit 87ddcc6.
@nielsdrost7: |
@nielsdrost7: |
This reverts commit 8e6579a.
<h3><i class="fa fa-file-pdf-o"></i><?php echo ' ' . trans('invoice') . ': #' . $invoice->invoice_number ; ?></h3> | ||
</div> | ||
<div class="modal-body" style="padding: 0; margin: 0; background-color: #ededf0;"> | ||
<iframe id="iframe_pdf" src="<?php echo site_url('invoices/generate_pdf/' . $invoice_id); ?>#zoom=page-width" width="100%" height="70%" scrolling="no" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Verony-makesIT can you find another solution than an iframe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nielsdrost7, I assume your question is because of a possible xss security issue with iframes?
I am currently exploring other options such as embed or object.
If you think of other or better options for previewing PDFs, please let me know...
Description
For those who prefer to view PDF's in a Modal instead of an additional TAB window. Switching back to the old default remains possible. The option can be changed via the setting "General" - "Show Options menu item [Preview PDF]".
Related Issue
#925
Motivation and Context
This option gives the user the choice of viewing the PDF of an invoice or quote, either in a TAB window (= default) or via a Modal window.
Screenshots (if appropriate):
Pull Request Checklist
Issue Type (Please check one or more)