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

Implement read-only setting for fields #23

Open
petri opened this issue Aug 21, 2015 · 6 comments
Open

Implement read-only setting for fields #23

petri opened this issue Aug 21, 2015 · 6 comments

Comments

@petri
Copy link
Member

petri commented Aug 21, 2015

I have a case whereby data for some fields (columns) should be set programmatically and only some is editable by end user.

I wonder if the ComputedField could be (ab-)used for this? So that one could programmatically set the value and the TALES expression would render it, making it in effect read-only? Ie. the TALES expression would render its own column value... would that work?

@keul
Copy link
Member

keul commented Aug 21, 2015

Hi @petri
Don't think this is doable with computed field.
Times ago I started planning edit permission for rows (not for columns) for a customer but then customer changed idea so I don't have any example for you.

Maybe you can do this simply with JavaScript? An additional JavaScript that put in readonly fields?

@petri
Copy link
Member Author

petri commented Aug 21, 2015

I guess so, for columns somehow marked as readonly, perhaps add a marker string such as permissions:readonly to column spec field...? Thanks.

@keul
Copy link
Member

keul commented Aug 21, 2015

Instead of permissions (that in plone has different meanings) I'll prefer visibility (like Archetypes feature).
If you want to provide a pull request for this I've nothing against this feature 👍

@petri
Copy link
Member Author

petri commented Oct 9, 2015

Could there be some other uses & therefore values for "visibility" than "readonly"?

@petri
Copy link
Member Author

petri commented Oct 13, 2015

Hm indeed visibility could of course also be "hidden"..

@keul
Copy link
Member

keul commented Oct 13, 2015

In Archetypes style you can have hidden and invisibile. Hidden is rendered as an INPUT of type HIDDEN, invisible is not show at all.
My 2 cents

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