noosfero | Add a upload file field, on the form of the CustomForm plugin. (!1302)

David Carlos gitlab at mg.gitlab.com
Thu Aug 24 19:50:53 BRT 2017


David Carlos commented on a discussion on plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb:

>  
>    def create
>      params[:form][:profile_id] = profile.id
> +    uploaded_data = params[:form].delete(:image)
>      @form = CustomFormsPlugin::Form.new(params[:form])
> -
> +    @form.build_article(

It's a good idea, but we have to be able to get the  form image by doing `form.image` (This will be useful when we presents the image in a block, for example). I will group the images inside the Gallery, and keep the relation between Form and Image. Works fine like this?

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1302#note_38470297
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170824/d5c37653/attachment-0001.html>


More information about the Noosfero-dev mailing list