Module: Admin::PropertiesHelper

Defined in:
app/helpers/admin/properties_helper.rb

Instance Method Summary collapse

Instance Method Details

#cancel_button(label, div_id, show = nil, hide = nil) ⇒ Object



2
3
4
5
6
7
8
# File 'app/helpers/admin/properties_helper.rb', line 2

def cancel_button(label, div_id, show=nil, hide=nil)
  onclick =  %Q{Element.update('#{div_id}','');}
  onclick += %Q{Element.show('#{show}');} if show
  onclick += %Q{Element.hide('#{hide}');} if hide

  %Q{<button type="reset" onClick="#{onclick}">#{label}</button>}
end