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

File / Image field type #21

Open
gartner opened this issue Dec 27, 2013 · 0 comments
Open

File / Image field type #21

gartner opened this issue Dec 27, 2013 · 0 comments

Comments

@gartner
Copy link
Owner

gartner commented Dec 27, 2013

Build a new HTML_QuickForm-element for file / image uploads.

Use https://github.com/Widen/fine-uploader.

Should take the current image as an option, so it can be displayed as a preview in the form.
Will require an Ajax-endpoint to store temporary images. When an image is uploaded, return a url to the temporary image, for display in the element preview.
Store this url in the element, so that when submitted, the form logic can copy the selected image into the correct place.

Also needs a delete-button, which removes the preview.

All functions should only add info to the form-field about what was added to the form:
If deleted, flag that somehow, if new file added, give the temporary name. And then let the form logic handle adding the image permanently or deleting original image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant