fix problem with sftpuser onnSAslist and webalizer
This commit is contained in:
parent
8ff8676773
commit
87ee955531
|
@ -23,6 +23,11 @@ class StaticApp(AppType):
|
|||
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):
|
||||
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.")
|
||||
icon = 'orchestra/icons/apps/Stats.png'
|
||||
option_groups = ()
|
||||
form = PluginDataForm
|
||||
# form = PluginDataForm
|
||||
form = WebalizerAppform
|
||||
|
||||
def get_directive(self):
|
||||
webalizer_path = os.path.join(self.instance.get_path(), '%(site_name)s')
|
||||
|
|
|
@ -29,7 +29,6 @@ class PluginDataForm(PluginForm):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||
if self.instance:
|
||||
for field in self.declared_fields:
|
||||
initial = self.fields[field].initial
|
||||
|
@ -103,6 +102,7 @@ class ExtendedPluginDataForm(PluginDataForm):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ExtendedPluginDataForm, self).__init__(*args, **kwargs)
|
||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||
if self.instance.id is not None:
|
||||
self.fields['username'].widget = forms.HiddenInput()
|
||||
self.fields['password1'].widget = forms.HiddenInput()
|
||||
|
|
Loading…
Reference in a new issue