fix problem with sftpuser onnSAslist and webalizer
This commit is contained in:
parent
314916ff5d
commit
9bc88493e1
|
@ -23,6 +23,11 @@ class StaticApp(AppType):
|
||||||
return ('static', self.instance.get_path())
|
return ('static', self.instance.get_path())
|
||||||
|
|
||||||
|
|
||||||
|
class WebalizerAppform(PluginDataForm):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(WebalizerAppform, self).__init__(*args, **kwargs)
|
||||||
|
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||||
|
|
||||||
class WebalizerApp(AppType):
|
class WebalizerApp(AppType):
|
||||||
name = 'webalizer'
|
name = 'webalizer'
|
||||||
verbose_name = "Webalizer"
|
verbose_name = "Webalizer"
|
||||||
|
@ -32,7 +37,8 @@ class WebalizerApp(AppType):
|
||||||
"Statistics will be collected once this app is mounted into one or more Websites.")
|
"Statistics will be collected once this app is mounted into one or more Websites.")
|
||||||
icon = 'orchestra/icons/apps/Stats.png'
|
icon = 'orchestra/icons/apps/Stats.png'
|
||||||
option_groups = ()
|
option_groups = ()
|
||||||
form = PluginDataForm
|
# form = PluginDataForm
|
||||||
|
form = WebalizerAppform
|
||||||
|
|
||||||
def get_directive(self):
|
def get_directive(self):
|
||||||
webalizer_path = os.path.join(self.instance.get_path(), '%(site_name)s')
|
webalizer_path = os.path.join(self.instance.get_path(), '%(site_name)s')
|
||||||
|
|
|
@ -29,7 +29,6 @@ class PluginDataForm(PluginForm):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
|
||||||
if self.instance:
|
if self.instance:
|
||||||
for field in self.declared_fields:
|
for field in self.declared_fields:
|
||||||
initial = self.fields[field].initial
|
initial = self.fields[field].initial
|
||||||
|
@ -103,6 +102,7 @@ class ExtendedPluginDataForm(PluginDataForm):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
||||||
|
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||||
if self.instance.id is not None:
|
if self.instance.id is not None:
|
||||||
self.fields['username'].widget = forms.HiddenInput()
|
self.fields['username'].widget = forms.HiddenInput()
|
||||||
self.fields['password1'].widget = forms.HiddenInput()
|
self.fields['password1'].widget = forms.HiddenInput()
|
||||||
|
|
Loading…
Reference in New Issue