semantic_form_for 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,14 +6,16 @@ class SemanticFormFor::FormBuilder < ActionView::Helpers::FormBuilder
|
|
6
6
|
attr_reader :object_name
|
7
7
|
|
8
8
|
FIELDSETS = [ :inputs, :buttons ]
|
9
|
+
|
9
10
|
INPUTS = [ :check_box, :email_field, :file_field, :hidden_field,
|
10
11
|
:number_field, :password_field, :radio_button, :range_field,
|
11
12
|
:search_field, :select, :text_area, :text_field,
|
12
13
|
:url_field ]
|
14
|
+
|
13
15
|
BUTTONS = [ :image_submit, :submit ]
|
14
16
|
|
15
17
|
FIELDSETS.each do |set|
|
16
|
-
define_method set do |text, &block|
|
18
|
+
define_method set do |text = nil, &block|
|
17
19
|
template.capture_haml do
|
18
20
|
template.haml_tag :fieldset, :class => set do
|
19
21
|
template.haml_tag(:legend, text) if text
|