Module: SimpleForm::KeitaiInput

Instance Method Summary collapse

Instance Method Details

#inputObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/simple_form-jpmobile.rb', line 7

def input
  if mobile
    if mobile.docomo?
      input_html_options[:type] ||= "text"
      input_html_options[:style] = %Q{-wap-input-format:"*<ja:#{docomo_wap_input_format}>"}
    elsif mobile.au? || mobile.softbank?
      input_html_options[:type] ||= "text"
      input_html_options[:istyle] ||= istyle
      input_html_options[:mode] ||= mode
      input_html_options[:style] ||= %Q{-wap-input-format:*#{other_wap_input_format};}
    end
  end
  super
end

#mobileObject



3
4
5
# File 'lib/simple_form-jpmobile.rb', line 3

def mobile
  @builder.template.request.mobile
end