Class: TempusDominusInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- TempusDominusInput
- Defined in:
- app/inputs/tempus_dominus_input.rb
Instance Method Summary collapse
- #div_button ⇒ Object
- #icon_remove ⇒ Object
- #icon_table ⇒ Object
- #input(wrapper_options) ⇒ Object
- #input_html_options ⇒ Object
- #span_table ⇒ Object
Instance Method Details
#div_button ⇒ Object
19 20 21 22 23 |
# File 'app/inputs/tempus_dominus_input.rb', line 19 def template.content_tag(:div, class: 'input-group-append', data: {target: "##{[:date_time_picker_identifier]}", toggle: 'datetimepicker'}) do span_table end end |
#icon_remove ⇒ Object
31 32 33 |
# File 'app/inputs/tempus_dominus_input.rb', line 31 def icon_remove "<i class='glyphicon glyphicon-remove'></i>".html_safe end |
#icon_table ⇒ Object
35 36 37 |
# File 'app/inputs/tempus_dominus_input.rb', line 35 def icon_table "<i class='fa fa-calendar'></i>".html_safe end |
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/inputs/tempus_dominus_input.rb', line 2 def input() template.content_tag(:div, class: "input-group date #{ has_errors? ? 'is-invalid' : ''}", data: { target_input: 'nearest'}, id: [:date_time_picker_identifier]) do tmp = ActiveSupport::SafeBuffer.new = (, ) tmp << @builder.text_field(attribute_name, ) tmp << tmp end end |
#input_html_options ⇒ Object
15 16 17 |
# File 'app/inputs/tempus_dominus_input.rb', line 15 def super.merge({class: 'form-control datetimepicker-input'}) end |
#span_table ⇒ Object
25 26 27 28 29 |
# File 'app/inputs/tempus_dominus_input.rb', line 25 def span_table template.content_tag(:div, class: 'input-group-text') do icon_table end end |