Class: UltimateTurboModal::Configuration::ConfirmConfig

Inherits:
BaseConfig
  • Object
show all
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

Attributes inherited from BaseConfig

#advance, #close_button, #close_on_submit, #footer_divider, #header, #header_divider, #overlay, #padding

Instance Method Summary collapse

Methods inherited from BaseConfig

boolean_option

Constructor Details

#initializeConfirmConfig

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_labelObject

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_labelObject

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

#enabledObject (readonly)

Returns the value of attribute enabled.



100
101
102
# File 'lib/ultimate_turbo_modal/configuration.rb', line 100

def enabled
  @enabled
end

#titleObject

Returns the value of attribute title.



99
100
101
# File 'lib/ultimate_turbo_modal/configuration.rb', line 99

def title
  @title
end