abstract edit

This commit is contained in:
Matthias 2021-07-22 23:44:25 +02:00
parent 6f5fc528b7
commit 7ef87320a0

View File

@ -45,8 +45,8 @@ class SettingEdit(AjaxUpdateView):
ctx['key'] = setting.key
ctx['value'] = setting.value
ctx['name'] = models.InvenTreeSetting.get_setting_name(setting.key)
ctx['description'] = models.InvenTreeSetting.get_setting_description(setting.key)
ctx['name'] = self.model.get_setting_name(setting.key)
ctx['description'] = self.model.get_setting_description(setting.key)
return ctx
@ -69,12 +69,12 @@ class SettingEdit(AjaxUpdateView):
self.object.value = str2bool(setting.value)
form.fields['value'].value = str2bool(setting.value)
name = models.InvenTreeSetting.get_setting_name(setting.key)
name = self.model.get_setting_name(setting.key)
if name:
form.fields['value'].label = name
description = models.InvenTreeSetting.get_setting_description(setting.key)
description = self.model.get_setting_description(setting.key)
if description:
form.fields['value'].help_text = description