4 from validations
import *
6 NOTE_SERVICE_TYPE
= 'What service type should we browse on the network for.'
8 class ModuleAvahiBase (Module
, FormHelper
):
13 def __init__ (self
, cfg
, prefix
, name
, submit_url
):
14 FormHelper
.__init
__ (self
, name
, cfg
)
15 Module
.__init
__ (self
, name
, cfg
, prefix
, submit_url
)
17 def _op_render (self
):
18 txt
= "<h2>Avahi options</h2>"
21 self
.AddPropEntry (table
, "mDNS Service Type", "%s!service_type" % (self
._prefix
), NOTE_SERVICE_TYPE
)
22 txt
+= self
.Indent(table
)
26 def _op_apply_changes (self
, uri
, post
):
27 self
.ApplyChangesPrefix (self
._prefix
, [], post
)
30 class ModuleAvahi (ModuleAvahiBase
):
31 def __init__ (self
, cfg
, prefix
, submit_url
):
32 ModuleAvahiBase
.__init
__ (self
, cfg
, prefix
, 'avahi', submit_url
)
34 def _op_render (self
):
35 return ModuleAvahiBase
._op
_render
(self
)
37 def _op_apply_changes (self
, uri
, post
):
38 return ModuleAvahiBase
._op
_apply
_changes
(self
, uri
, post
)