cirandas.net

ref: master

plugins/orders/lib/orders_plugin/display_helper.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
module OrdersPlugin::DisplayHelper

  protected

  include HelpHelper

  include OrdersPlugin::TranslationHelper
  include OrdersPlugin::PriceHelper
  include OrdersPlugin::DateHelper
  include OrdersPlugin::FieldHelper
  include OrdersPlugin::TableHelper
  include OrdersPlugin::AdminHelper
  include OrdersPlugin::JavascriptHelper

  include DeliveryPlugin::DisplayHelper

  # come on, you can't replace a rails api method (button_to_function was)!
  def submit_to_function name, function, html_options={}
    content_tag :input, '', html_options.merge(onclick: function, type: 'submit', value: name)
  end

end