Skip to content

Commit

Permalink
Fixes #393 - migrate to new simple_form syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Jan 6, 2015
1 parent 4b820fd commit 46f6069
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/inputs/date_pair_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DatePairInput < SimpleForm::Inputs::Base

# Output two date fields: start and end
#------------------------------------------------------------------------------
def input
def input(wrapper_options)
add_autocomplete!
out = "<br />".html_safe

Expand All @@ -20,7 +20,7 @@ def input
input_html_options.merge!(field.input_options)
input_html_options.merge!(value: value(field))
out << "<label#{' class="req"' if input_html_options[:required]}>#{label}</label>".html_safe
text = @builder.text_field(field.name, input_html_options)
text = @builder.text_field(field.name, merge_wrapper_options(input_html_options, wrapper_options))
out << text << '</div>'.html_safe
end

Expand Down
4 changes: 2 additions & 2 deletions app/inputs/date_time_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#------------------------------------------------------------------------------
class DateTimeInput < SimpleForm::Inputs::DateTimeInput

def input
def input(wrapper_options)
add_autocomplete!
input_html_options.merge(input_options)
input_html_options.merge!(value: value)
@builder.text_field(attribute_name, input_html_options)
@builder.text_field(attribute_name, merge_wrapper_options(input_html_options, wrapper_options))
end

def label_target
Expand Down
4 changes: 2 additions & 2 deletions app/inputs/text_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class TextInput < SimpleForm::Inputs::TextInput
def input
@builder.text_area(attribute_name, {rows: 7}.merge(input_html_options))
def input(wrapper_options)
@builder.text_area(attribute_name, {rows: 7}.merge(merge_wrapper_options(input_html_options, wrapper_options)))
end

ActiveSupport.run_load_hooks(:fat_free_crm_text_input, self)
Expand Down

0 comments on commit 46f6069

Please sign in to comment.