Class: Registration::UI::RegisteredSystemDialog

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

Overview

this class displays and runs the status dialog for an already registered system

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRegisteredSystemDialog

the constructor


28
29
30
# File 'src/lib/registration/ui/registered_system_dialog.rb', line 28

def initialize
  textdomain "registration"
end

Instance Attribute Details

#addonsObject (readonly)

Returns the value of attribute addons


13
14
15
# File 'src/lib/registration/ui/registered_system_dialog.rb', line 13

def addons
  @addons
end

Class Method Details

.runSymbol

displays and run the status dialog for an already registered system

Returns:

  • (Symbol)

    user input


22
23
24
25
# File 'src/lib/registration/ui/registered_system_dialog.rb', line 22

def self.run
  dialog = RegisteredSystemDialog.new
  dialog.run
end

Instance Method Details

#runSymbol

display and run the dialog

Returns:

  • (Symbol)

    user input


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'src/lib/registration/ui/registered_system_dialog.rb', line 34

def run
  Wizard.SetContents(
    # dialog title
    _("Registration"),
    dialog_content,
    # help text
    _("<p>The system is already registered.</p>") +
      _("<p>You can re-register it again or you can register additional "\
        "extension or modules to enhance the functionality of the system.</p>") +
      _("<p>If you want to deregister your system you need to log "\
        "into the SUSE Customer Center and remove the system manually there.</p>"),
    GetInstArgs.enable_back || Mode.normal,
    GetInstArgs.enable_back || Mode.normal
  )

  Wizard.SetNextButton(:next, Label.FinishButton) if Mode.normal

  continue_buttons = [:next, :back, :cancel, :abort, :register, :extensions]

  ret = nil
  ret = Yast::UI.UserInput until continue_buttons.include?(ret)

  Wizard.RestoreNextButton

  ret
end