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

Rodrigo Souto gitlab at mg.gitlab.com
Thu Aug 31 22:10:43 BRT 2017


Rodrigo Souto started a new 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_image = UploadedFile.new(
> +      :uploaded_data => uploaded_data,
> +      :profile => profile,
> +      :parent => nil,
> +    )
> +
>      @form = CustomFormsPlugin::Form.new(params[:form])
> +    form_gallery = Gallery.find_or_initialize_by(profile: profile, 
> +                                                 name: "Query Gallery")

@davidCarlos Can you also translate this "Query Gallery"?

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1302#note_39050192
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/20170901/8ed5ddc9/attachment-0001.html>


More information about the Noosfero-dev mailing list