Class: AdminWidgets::FormWidget

Inherits:
BaseFormWidget show all
Defined in:
lib/admin_widgets/form_widget.rb

Direct Known Subclasses

AdminWidgets::Form::FieldsetWidget

Instance Attribute Summary

Attributes inherited from BaseFormWidget

#form

Instance Method Summary collapse

Methods inherited from BaseFormWidget

#around_form, #autofocus!, #autofocus_done?, #builder, #content, #field, #form_content

Methods inherited from BaseWidget

#capture, #content_block, #helper, #method_missing, #root

Methods included from Memoization

#memoize

Methods included from Delegation

#delegate

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AdminWidgets::BaseWidget

Instance Method Details

#buttonsObject



13
14
15
16
17
18
19
20
21
# File 'lib/admin_widgets/form_widget.rb', line 13

def buttons
  div :class => ['group', 'navform', 'wat-cf'] do
    rawtext helper.button_tag(:class => 'button') {
      helper.image_tag('icons/tick.png') +
      helper.t('resources.actions.save')
    } if save_button
    rawtext helper.link_to(helper.t('resources.actions.cancel'), cancel_url, :class => "text_button_padding link_button") if cancel_url
  end
end

#fieldset(name, options = {}, &block) ⇒ Object

DSL methods



9
10
11
# File 'lib/admin_widgets/form_widget.rb', line 9

def fieldset(name, options = {}, &block)
  widget AdminWidgets::Form::FieldsetWidget.new(options.merge(:name => name, :parent => self, :block => block))
end