Skip to content
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

Show forms as read-only if the file is not editable #850

Merged

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented Nov 3, 2023

Follow up to #787 and #849

If the file is not editable it can not be saved back to Nextcloud, so in that case the forms should be shown, but only as read-only.

While working on this I realized that it might be possible to move the PDF.js initialization to the PDFView.vue file, but... something for the future :-)

How to test

  • Open the Files app
  • Upload a PDF file with forms
  • Create a read-only public share for the PDF file
  • Open the link

Result with this pull request

The forms can be viewed, but not edited

Result without this pull request

The forms can be edited, but they can not be saved

If the file is not editable it can not be saved back to Nextcloud, so in
that case the forms should be shown, but only as read-only.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works

@szaimen szaimen merged commit 2f5f893 into master Nov 3, 2023
17 checks passed
@delete-merged-branch delete-merged-branch bot deleted the show-forms-as-read-only-if-the-file-is-not-editable branch November 3, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants