Skip to content

Commit

Permalink
share part of help text, some workflow fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed May 15, 2015
1 parent a5a880a commit 3132f77
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/clients/inst_scc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def registration_ui
def workflow_aliases
{
# skip this when going back
"check" => [->() { registration_check }, true],
"check" => ->() { registration_check },
"register" => ->() { register_base_system },
"select_addons" => ->() { select_addons },
"select_addons_rereg" => ->() { select_addons(reregistration: true) },
Expand Down Expand Up @@ -298,6 +298,7 @@ def start_workflow
},
"select_addons_rereg" => {
abort: :abort,
skip: "check",
cancel: "check",
next: "reregister_addons"
},
Expand Down
11 changes: 11 additions & 0 deletions src/lib/registration/ui/addon_selection_base_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ def supported_addon_count?

true
end

# shared part of the help text
# @return [String] translated help text
def generic_help_text
# help text (2/3)
_("<p>Please note, that some extensions or modules might need "\
"specific registration code.</p>") +
# help text (3/3)
_("<p>If you want to remove any extension or module you need to log"\
"into the SUSE Customer Center and remove them manually there.</p>")
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ def run
content,
# help text (1/3)
_("<p>Here you can select available extensions and modules for your"\
"system.</p>") +
# help text (2/3)
_("<p>Please note, that some extensions or modules might need "\
"specific registration code.</p>") +
# help text (3/3)
_("<p>If you want to remove any extension or module you need to log"\
"into the SUSE Customer Center and remove them manually there.</p>"),
"system.</p>") + generic_help_text,
# always enable Back/Next, the dialog cannot be the first in workflow
true,
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ def run
content,
# help text (1/3)
_("<p>Here you can select extensions and modules which will be "\
"registered again.</p>") +
# help text (2/3)
_("<p>Please note, that some extensions or modules might need "\
"specific registration code.</p>") +
# help text (3/3)
_("<p>If you want to remove any extension or module you need to log"\
"into the SUSE Customer Center and remove them manually there.</p>"),
"registered again.</p>") + generic_help_text,
# always enable Back/Next, the dialog cannot be the first in workflow
true,
true
Expand Down
4 changes: 2 additions & 2 deletions src/lib/registration/ui/base_system_registration_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run
_("Registration"),
content,
help_text,
Yast::GetInstArgs.enable_back,
Yast::GetInstArgs.enable_back || (Yast::Mode.normal && Registration.is_registered?),
Yast::GetInstArgs.enable_next || Yast::Mode.normal
)

Expand Down Expand Up @@ -157,7 +157,7 @@ def handle_dialog
when :next
ret = handle_registration
when :abort
ret = nil unless Yast::Popup.ConfirmAbort(:painless)
ret = nil unless Yast::Mode.normal || Yast::Popup.ConfirmAbort(:painless)
when :skip
ret = nil unless confirm_skipping
end
Expand Down

0 comments on commit 3132f77

Please sign in to comment.