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

Move form template from helper into the generator #1

Open
ryanwood opened this issue Sep 2, 2013 · 4 comments
Open

Move form template from helper into the generator #1

ryanwood opened this issue Sep 2, 2013 · 4 comments

Comments

@ryanwood
Copy link

ryanwood commented Sep 2, 2013

I'm using Bootstrap 3. The way you have the html embedded in the form helper makes it impossible to to change the markup but take advantage of the policy and form helpers. Since you are already generating a number of views, why not generate the form view so the markup can be changed/updated?

@batter
Copy link
Owner

batter commented Sep 2, 2013

I made the form helper provide a singular tag helper to the view because I thought it would simplify the work for others and due to the nature of the dynamic values that need to be put into the fields in order to make the uploads to S3 work. That being said, you can still use the PolicyHelper class outside the context of the FormHelper module to construct your own form syntax if you desire.

The s3_cors_fileupload_form_tag helper accepts a block argument so that you can append additional fields or html into the form area if desired as well. What exactly are you trying to accomplish?

@ryanwood
Copy link
Author

ryanwood commented Sep 2, 2013

Primarily I needed to update the form markup to work with Bootstrap 3.0. It only needed minor adjustments. Hard to warrant building out my own form for that. Thanks for the follow up.

@batter
Copy link
Owner

batter commented Sep 3, 2013

Has the syntax for the form changed on the trunk of the jQuery-File-Upload project? If so, I'll just pull in the most recent changes (which I'd think would work with Bootstrap 3.0). Or if you have a pull request showing how you think this could work in a way that would make it more flexible, I'm happy to take a look at that as well. Perhaps it makes sense to offer an option for syntax for Bootstrap 3.0 vs. 2.0 for the form syntax? I don't know much about the differences as I only use bootstrap in my projects for this javascript for the most part.

I've been meaning to give this project more attention but have been pretty busy trying to focus on releasing PaperTrail 3.0.

@ryanwood
Copy link
Author

ryanwood commented Sep 3, 2013

To be honest, I ended up using another gem for this purpose (https://github.com/waynehoover/s3_direct_upload) so I'm not going to have the time to do a PR on this gem.

Bootstrap changed class name in their grid from using span-12 to col-md-12. They also changed icon from images to a font. it just seems that any markup/view should be templated to accommodate changes like this. Ideally, you shouldn't have to rewrite Ruby methods to change the name of a class, IMHO.

On Tuesday, September 3, 2013 at 9:52 AM, Ben Atkins wrote:

Has the syntax for the form changed on the trunk of the jQuery-File-Upload (https://github.com/blueimp/jQuery-File-Upload) project? If so, I'll just pull in the most recent changes (which I'd think would work with Bootstrap 3.0). Or if you have a pull request showing how you think this could work in a way that would make it more flexible, I'm happy to take a look at that as well. Perhaps it makes sense to offer an option for syntax for Bootstrap 3.0 vs. 2.0 for the form syntax? I don't know much about the differences as I only use bootstrap in my projects for this javascript for the most part.


Reply to this email directly or view it on GitHub (#1 (comment)).

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

2 participants