Class: Effective::FormInputs::RemoteLinkTo
- Inherits:
-
Submit
- Object
- Effective::FormInput
- Submit
- Effective::FormInputs::RemoteLinkTo
- Defined in:
- app/models/effective/form_inputs/remote_link_to.rb
Constant Summary
Constants inherited from Effective::FormInput
Effective::FormInput::BLANK, Effective::FormInput::DEFAULT_FEEDBACK_OPTIONS, Effective::FormInput::DEFAULT_INPUT_GROUP_OPTIONS, Effective::FormInput::EMPTY_HASH, Effective::FormInput::EXCLUSIVE_CLASS_PREFIXES, Effective::FormInput::EXCLUSIVE_CLASS_SUFFIXES, Effective::FormInput::HORIZONTAL_LABEL_OPTIONS, Effective::FormInput::HORIZONTAL_WRAPPER_OPTIONS, Effective::FormInput::INLINE_LABEL_OPTIONS, Effective::FormInput::VERTICAL_WRAPPER_OPTIONS
Instance Attribute Summary
Attributes inherited from Effective::FormInput
Instance Method Summary collapse
Methods inherited from Submit
#label_options, #to_html, #wrapper_options
Methods inherited from Effective::FormInput
#feedback_options, #hint_options, #initialize, #input_group_options, #input_js_options, #label_options, #to_html, #wrapper_options
Constructor Details
This class inherits a constructor from Effective::FormInput
Instance Method Details
#border? ⇒ Boolean
22 23 24 |
# File 'app/models/effective/form_inputs/remote_link_to.rb', line 22 def border? false end |
#build_input(&block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/effective/form_inputs/remote_link_to.rb', line 7 def build_input(&block) = [ icon('check', style: 'display: none;'), icon('x', style: 'display: none;'), icon('spinner'), (block_given? ? capture(&block) : content_tag(:a, name, [:input])) ] (left? ? .reverse.join : .join).html_safe end |
#confirm ⇒ Object
26 27 28 |
# File 'app/models/effective/form_inputs/remote_link_to.rb', line 26 def confirm (.delete(:confirm) || "#{name} to<br>#{object}?").html_safe end |
#input_html_options ⇒ Object
18 19 20 |
# File 'app/models/effective/form_inputs/remote_link_to.rb', line 18 def { class: '', rel: 'nofollow', data: { method: :post, remote: true, confirm: confirm } } end |