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

Add support for read-only fields #25

Closed
darinwilson opened this issue Sep 20, 2016 · 0 comments
Closed

Add support for read-only fields #25

darinwilson opened this issue Sep 20, 2016 · 0 comments
Assignees
Milestone

Comments

@darinwilson
Copy link
Contributor

There are cases where fields should be visible to admins, but not editable, e.g. timestamps. The user could specify this on the command line by appending :readonly when generating the admin area on the command line:

$ mix torch.gen eex Admin Post posts title:string body:text inserted_at:date:readonly

The generated template could either put the value in a disabled input, or just display it as plain text. The controller would exclude read-only fields when creating changesets.

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