Module: Yast::DnsServerDialogsInclude
- Defined in:
- ../../src/include/dns-server/dialogs.rb
Instance Method Summary (collapse)
- - (Object) initialize_dns_server_dialogs(include_target)
-
- (Object) ReadDialog
Read settings dialog.
-
- (Object) ReallyAbort
If modified, ask for confirmation.
-
- (Object) ReallyAbortAlways
Ask for confirmation (always).
-
- (Boolean) ReallyExit
Ask user if exit without saving.
- - (Object) runZoneTypeSwitch
-
- (Object) WriteDialog
Write settings dialog.
Instance Method Details
- (Object) initialize_dns_server_dialogs(include_target)
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File '../../src/include/dns-server/dialogs.rb', line 14 def initialize_dns_server_dialogs(include_target) textdomain "dns-server" Yast.import "DnsServer" Yast.import "Popup" Yast.import "Label" Yast.import "CWM" Yast.import "Wizard" Yast.import "Message" Yast.import "SuSEFirewall" Yast.import "Punycode" Yast.import "Confirm" end |
- (Object) ReadDialog
Read settings dialog
52 53 54 55 56 57 58 59 60 |
# File '../../src/include/dns-server/dialogs.rb', line 52 def ReadDialog Wizard.RestoreHelp(Ops.get_string(@HELPS, "read", "")) # checking for root permissions return :abort if !Confirm.MustBeRoot ret = DnsServer.Read ret ? :next : :abort end |
- (Object) ReallyAbort
If modified, ask for confirmation
39 40 41 42 |
# File '../../src/include/dns-server/dialogs.rb', line 39 def ReallyAbort return true if !DnsServer.WasModified Popup.ReallyAbort(true) end |
- (Object) ReallyAbortAlways
Ask for confirmation (always)
46 47 48 |
# File '../../src/include/dns-server/dialogs.rb', line 46 def ReallyAbortAlways Popup.ReallyAbort(true) end |
- (Boolean) ReallyExit
Ask user if exit without saving
31 32 33 34 35 |
# File '../../src/include/dns-server/dialogs.rb', line 31 def ReallyExit return true if !DnsServer.WasModified # yes-no popup Popup.YesNo(_("All changes will be lost.\nReally exit?")) end |
- (Object) runZoneTypeSwitch
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File '../../src/include/dns-server/dialogs.rb', line 77 def runZoneTypeSwitch type = Ops.get_string(@current_zone, "type", "master") name = Ops.get_string(@current_zone, "zone", "unknown") Builtins.y2milestone( "Editing zone %1 (%2), type %3", name, Punycode.DecodeDomainName(name), type ) if type == "master" return :master elsif type == "slave" return :slave elsif type == "stub" return :stub elsif type == "forward" return :forward else # message popup Popup.Message(_("A zone of this type cannot be edited with this tool.")) return :back end end |
- (Object) WriteDialog
Write settings dialog
64 65 66 67 68 69 70 71 72 73 74 75 |
# File '../../src/include/dns-server/dialogs.rb', line 64 def WriteDialog Wizard.RestoreHelp(Ops.get_string(@HELPS, "write", "")) ret = DnsServer.Write # yes-no popup if !ret && Popup.YesNo( _("Saving the configuration failed. Change the settings?") ) return :back end ret ? :next : :abort end |