mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-12 09:17:56 +03:00
Fixed HTML5 transports and advanced tab translation for label
This commit is contained in:
parent
3dd73f4723
commit
5ce7ddc3a7
@ -167,7 +167,7 @@ class Transports(ModelHandler):
|
||||
),
|
||||
'type': 'text',
|
||||
'order': 201,
|
||||
'tab': gui.ADVANCED_TAB,
|
||||
'tab': ugettext(gui.ADVANCED_TAB),
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -320,8 +320,8 @@ class HTML5RDPTransport(transports.Transport):
|
||||
def initialize(self, values: 'Module.ValuesType'):
|
||||
if not values:
|
||||
return
|
||||
# Strip spaces
|
||||
self.guacamoleServer.value = self.guacamoleServer.value.strip()
|
||||
# Strip spaces and all trailing '/'
|
||||
self.guacamoleServer.value = self.guacamoleServer.value.strip().rstrip('/')
|
||||
if self.guacamoleServer.value[0:4] != 'http':
|
||||
raise transports.Transport.ValidationException(
|
||||
_('The server must be http or https')
|
||||
|
@ -180,7 +180,8 @@ class HTML5VNCTransport(transports.Transport):
|
||||
if not values:
|
||||
return
|
||||
# Strip spaces
|
||||
self.guacamoleServer.value = self.guacamoleServer.value.strip()
|
||||
# Remove trailing / (one or more) from url if it exists from "guacamoleServer" field
|
||||
self.guacamoleServer.value = self.guacamoleServer.value.strip().rstrip('/')
|
||||
if self.guacamoleServer.value[0:4] != 'http':
|
||||
raise transports.Transport.ValidationException(
|
||||
_('The server must be http or https')
|
||||
|
Loading…
Reference in New Issue
Block a user