Skip to content

Commit

Permalink
Merge branch 'SLE-12-SP1' into visible-next-button-12sp3
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Sep 3, 2018
2 parents 36b6657 + a0378d4 commit d908a70
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 65 deletions.
8 changes: 8 additions & 0 deletions package/yast2-support.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Aug 30 13:01:32 UTC 2018 - mvidner@suse.com

- In ncurses the "Next" button to submit the gathered information
was not visible (bsc#1093358)
- Made the Contact Information screen fit in a 80x24 terminal
- 3.2.1

-------------------------------------------------------------------
Fri Jun 16 08:08:10 UTC 2017 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-support.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-support
Version: 3.2.0
Version: 3.2.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
91 changes: 27 additions & 64 deletions src/include/support/dialogs.rb
Expand Up @@ -677,6 +677,15 @@ def ExpertDialog
Convert.to_symbol(ret)
end

# A helper to construct the UI
# @param id [Symbol]
# @param label [String]
# @param key [String] key in Support.options
def input_field(id, label, key)
value = Support.options.fetch(key, "")
Left(InputField(Id(id), label, value))
end

# Configure2 dialog
# @return dialog result
def ContactDialog
Expand All @@ -687,66 +696,20 @@ def ContactDialog
contents = VBox(
Frame(
_("Contact Information"),
VBox(
Left(
InputField(
Id(:company),
_("Company"),
Ops.get_string(
Support.options,
"VAR_OPTION_CONTACT_COMPANY",
""
)
)
),
Left(
InputField(
Id(:email),
_("Email Address"),
Ops.get_string(Support.options, "VAR_OPTION_CONTACT_EMAIL", "")
)
),
Left(
InputField(
Id(:name),
_("Name"),
Ops.get_string(Support.options, "VAR_OPTION_CONTACT_NAME", "")
)
),
Left(
InputField(
Id(:phone),
_("Phone Number"),
Ops.get_string(Support.options, "VAR_OPTION_CONTACT_PHONE", "")
)
),
Left(
InputField(
Id(:storeid),
_("Store ID"),
Ops.get_string(
Support.options,
"VAR_OPTION_CONTACT_STOREID",
""
)
)
),
Left(
InputField(
Id(:terminalid),
_("Terminal ID"),
Ops.get_string(
Support.options,
"VAR_OPTION_CONTACT_TERMINALID",
""
)
HBox(
Top(
VBox(
input_field(:company, _("Company"), "VAR_OPTION_CONTACT_COMPANY"),
input_field(:email, _("Email Address"), "VAR_OPTION_CONTACT_EMAIL"),
input_field(:name, _("Name"), "VAR_OPTION_CONTACT_NAME"),
input_field(:phone, _("Phone Number"), "VAR_OPTION_CONTACT_PHONE")
)
),
Left(
InputField(
Id(:gpg_uid),
_("GPG UID"),
Ops.get_string(Support.options, "VAR_OPTION_GPG_UID", "")
Top(
VBox(
input_field(:storeid, _("Store ID"), "VAR_OPTION_CONTACT_STOREID"),
input_field(:terminalid, _("Terminal ID"), "VAR_OPTION_CONTACT_TERMINALID"),
input_field(:gpg_uid, _("GPG UID"), "VAR_OPTION_GPG_UID")
)
)
)
Expand All @@ -759,11 +722,7 @@ def ContactDialog
Id(:target),
_("Upload Target"),
Builtins.deletechars(
Ops.get_string(
Support.options,
"VAR_OPTION_UPLOAD_TARGET",
""
),
Support.options.fetch("VAR_OPTION_UPLOAD_TARGET", ""),
"'"
)
)
Expand Down Expand Up @@ -867,7 +826,10 @@ def ContactDialog

def GenerateDialog
caption = _("Collecting Data")
contents = VBox(LogView(Id(:log), _("Progress"), 1000, 1000))
contents = VBox(
ReplacePoint(Id(:rp), Empty()),
LogView(Id(:log), Opt(:vstretch), _("Progress"), 10, 1000)
)
Wizard.SetContentsButtons(
caption,
contents,
Expand Down Expand Up @@ -916,6 +878,7 @@ def GenerateDialog
end
else
Wizard.EnableNextButton
UI.ReplaceWidget(Id(:rp), Empty()) # work around bsc#1106744
break
end
ret = Convert.to_symbol(UI.PollInput)
Expand Down

0 comments on commit d908a70

Please sign in to comment.