Ticket #637: mailer_page.diff
| File mailer_page.diff, 2.2 kB (added by fabrice, 4 months ago) |
|---|
-
/Users/fabrice/Sites/worldlpgas.com/www_edge/vendor/extensions/mailer/app/models/mailer_page.rb
old new 27 27 # If there are recipients defined, send email... 28 28 if form_conf.has_key? :recipients 29 29 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 ) 31 31 else 32 32 super(request, response) 33 33 end … … 132 132 :value => tag_attr.delete(:value) || tag_attr[:name], 133 133 :name => tag.locals.parent_tag_name 134 134 }) 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 ) 137 137 result << %Q|<span>#{tag_attr[:name]}</span></label>| 138 138 end 139 139 end … … 230 230 # Data defined in config part 231 231 recipients = form_conf[:recipients] 232 232 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 234 234 # Render the email templates from page parts 235 235 plain_body = part( :email ) ? render_part( :email ) : render_part( :email_plain ) 236 236 html_body = render_part( :email_html ) || nil … … 269 269 :subject => form_data[:subject] || form_conf[:subject] || "Form Mail from #{request.host}", 270 270 :plain_body => plain_body, 271 271 :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] || "", 273 273 :headers => { 'Reply-To' => reply_to } 274 274 ) 275 275 rescue
