Class: Registration::UI::AddonRegCodesDialog

Inherits:
Object
  • Object
show all
Includes:
Yast, Yast::I18n, Yast::Logger, Yast::UIShortcuts
Defined in:
src/lib/registration/ui/addon_reg_codes_dialog.rb

Overview

this class displays and runs the dialog for asking the user for the reg. codes

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(addons, known_reg_codes) ⇒ AddonRegCodesDialog

the constructor


34
35
36
37
38
39
# File 'src/lib/registration/ui/addon_reg_codes_dialog.rb', line 34

def initialize(addons, known_reg_codes)
  textdomain "registration"

  @addons = addons
  @known_reg_codes = known_reg_codes
end

Class Method Details

.run(addons, known_reg_codes) ⇒ Symbol

display and run the dialog for entering registration codes


25
26
27
28
# File 'src/lib/registration/ui/addon_reg_codes_dialog.rb', line 25

def self.run(addons, known_reg_codes)
  dialog = AddonRegCodesDialog.new(addons, known_reg_codes)
  dialog.run
end

Instance Method Details

#runSymbol

display the extension selection dialog and wait for a button click


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'src/lib/registration/ui/addon_reg_codes_dialog.rb', line 43

def run
  Wizard.SetContents(
    # dialog title
    _("Extension and Module Registration Codes"),
    # display only the products which need a registration code
    content,
    # help text
    _("<p>Enter registration codes for the requested extensions or modules.</p>\n"\
        "<p>Registration codes are required for successfull registration." \
        "If you cannot provide a registration code then go back and deselect " \
        "the respective extension or module.</p>"),
    true,
    true
  )

  handle_dialog
end