Class: UltimateTurboModal::Configuration::ConfirmConfig
- Inherits:
-
BaseConfig
- Object
- BaseConfig
- UltimateTurboModal::Configuration::ConfirmConfig
- Defined in:
- lib/ultimate_turbo_modal/configuration.rb
Overview
Defaults for the Turbo Confirm dialog. Every value here is a fallback:
anything supplied per-element through data-turbo-confirm wins.
Instance Attribute Summary collapse
-
#accept_label ⇒ Object
Returns the value of attribute accept_label.
-
#cancel_label ⇒ Object
Returns the value of attribute cancel_label.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from BaseConfig
#advance, #close_button, #close_on_submit, #footer_divider, #header, #header_divider, #overlay, #padding
Instance Method Summary collapse
-
#initialize ⇒ ConfirmConfig
constructor
advanceandclose_on_submitare left unset: a confirm never pushes a URL and holds no form, and the dialog binds neither behavior.
Methods inherited from BaseConfig
Constructor Details
#initialize ⇒ ConfirmConfig
advance and close_on_submit are left unset: a confirm never pushes a
URL and holds no form, and the dialog binds neither behavior.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/ultimate_turbo_modal/configuration.rb', line 106 def initialize @enabled = true # A confirm has its own Cancel button, and dividers chop up what is # only ever a line or two of text. @close_button = false @header = true @header_divider = false @footer_divider = false @padding = true @overlay = true @title = "Are you sure?" @accept_label = "OK" @cancel_label = "Cancel" end |
Instance Attribute Details
#accept_label ⇒ Object
Returns the value of attribute accept_label.
99 100 101 |
# File 'lib/ultimate_turbo_modal/configuration.rb', line 99 def accept_label @accept_label end |
#cancel_label ⇒ Object
Returns the value of attribute cancel_label.
99 100 101 |
# File 'lib/ultimate_turbo_modal/configuration.rb', line 99 def cancel_label @cancel_label end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
100 101 102 |
# File 'lib/ultimate_turbo_modal/configuration.rb', line 100 def enabled @enabled end |
#title ⇒ Object
Returns the value of attribute title.
99 100 101 |
# File 'lib/ultimate_turbo_modal/configuration.rb', line 99 def title @title end |