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

CRUD of readOnly models should not allow to press Save #1945

Open
mkrecek234 opened this issue Dec 5, 2022 · 2 comments
Open

CRUD of readOnly models should not allow to press Save #1945

mkrecek234 opened this issue Dec 5, 2022 · 2 comments

Comments

@mkrecek234
Copy link
Contributor

mkrecek234 commented Dec 5, 2022

Steps to reproduce:

  • You have a model with readOnly=true
  • You add a Crud and set it to that model.

Expected behavior:

  • You can see the crud list, eventually you can also click on the pencil icon to see the details of the entry.
  • The fields in the edit form should be readOnly, not editable.
  • There should not be a "Save" button, but this would read "Close" and only close the modal without saving.

Actual behavior:

  • The fields are all editable.
  • You can edit an entry using the pencil icon, and click save. It will then throw an error.
@mvorisek
Copy link
Member

mvorisek commented Dec 5, 2022

Wasn't this the way it was working before?

probably not, AFAK there was only a few issues with Fomantic-UI which were fixed in 2.9.0

Expected behavior:

"edit" action is/might be good to "preview" normally not displayed data... but why should readonly model support "edit" action at all?

@mkrecek234
Copy link
Contributor Author

mkrecek234 commented Dec 5, 2022

Agree - edit should not be active if readOnly. We could though add a "View" action which is by definition readOnly, and only shown in Crud if readOnly is true. But deactivating edit function in the first place for readOnly models would be more important

@mvorisek mvorisek changed the title Cruds of readOnly models should not allow to press Save CRUD of readOnly models should not allow to press Save Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants