Ticket #637: mailer_page.diff

File mailer_page.diff, 2.2 kB (added by fabrice, 4 months ago)

Patch for vendor/extensions/mailer/app/models/mailer_page.rb

  • /Users/fabrice/Sites/worldlpgas.com/www_edge/vendor/extensions/mailer/app/models/mailer_page.rb

    old new  
    2727      # If there are recipients defined, send email... 
    2828      if form_conf.has_key? :recipients 
    2929        if send_mail and form_conf.has_key? :redirect_to 
    30           response.redirect( form_conf[:redirect_to]
     30          response.redirect( form_conf[:redirect_to], :status => 302
    3131        else 
    3232          super(request, response)  
    3333        end 
     
    132132          :value => tag_attr.delete(:value) || tag_attr[:name], 
    133133          :name => tag.locals.parent_tag_name 
    134134        }) 
    135         result << %Q|<label for="#{options[:id]}">| 
    136         result << input_tag_html( 'radio', options ) 
     135        result << %Q|<label for="#{options[:id]}">| 
     136        result << input_tag_html( 'radio', options ) 
    137137        result << %Q|<span>#{tag_attr[:name]}</span></label>| 
    138138      end 
    139139    end 
     
    230230      # Data defined in config part 
    231231      recipients = form_conf[:recipients] 
    232232      from = form_data[form_conf[:from_field]] || form_conf[:from] || "no-reply@#{request.host}" 
    233       reply_to = form_data[form_conf[:reply_to_field]] || form_conf[:reply_to] || from 
     233      reply_to = form_data[form_conf[:reply_to_field]] || form_conf[:reply_to] || from 
    234234      # Render the email templates from page parts 
    235235      plain_body = part( :email ) ? render_part( :email ) : render_part( :email_plain ) 
    236236      html_body = render_part( :email_html ) || nil 
     
    269269        :subject => form_data[:subject] || form_conf[:subject] || "Form Mail from #{request.host}", 
    270270        :plain_body => plain_body, 
    271271        :html_body => html_body, 
    272         :cc => form_data[form_conf[:cc_field]] || form_conf[:cc] || "", 
     272        :cc => form_data[form_conf[:cc_field]] || form_conf[:cc] || "", 
    273273        :headers => { 'Reply-To' => reply_to } 
    274274      ) 
    275275    rescue