mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
usersetting edit url
This commit is contained in:
parent
7ef87320a0
commit
449fc329c9
@ -43,7 +43,7 @@ from .views import CurrencySettingsView, CurrencyRefreshView
|
|||||||
from .views import AppearanceSelectView, SettingCategorySelectView
|
from .views import AppearanceSelectView, SettingCategorySelectView
|
||||||
from .views import DynamicJsView
|
from .views import DynamicJsView
|
||||||
|
|
||||||
from common.views import SettingEdit
|
from common.views import SettingEdit, UserSettingEdit
|
||||||
|
|
||||||
from .api import InfoView, NotFoundView
|
from .api import InfoView, NotFoundView
|
||||||
from .api import ActionPluginView
|
from .api import ActionPluginView
|
||||||
@ -94,6 +94,7 @@ settings_urls = [
|
|||||||
url(r'^currencies/', CurrencySettingsView.as_view(), name='settings-currencies'),
|
url(r'^currencies/', CurrencySettingsView.as_view(), name='settings-currencies'),
|
||||||
url(r'^currencies-refresh/', CurrencyRefreshView.as_view(), name='settings-currencies-refresh'),
|
url(r'^currencies-refresh/', CurrencyRefreshView.as_view(), name='settings-currencies-refresh'),
|
||||||
|
|
||||||
|
url(r'^(?P<pk>\d+)/edit/user', UserSettingEdit.as_view(), name='user-setting-edit'),
|
||||||
url(r'^(?P<pk>\d+)/edit/', SettingEdit.as_view(), name='setting-edit'),
|
url(r'^(?P<pk>\d+)/edit/', SettingEdit.as_view(), name='setting-edit'),
|
||||||
|
|
||||||
# Catch any other urls
|
# Catch any other urls
|
||||||
|
@ -111,6 +111,18 @@ class SettingEdit(AjaxUpdateView):
|
|||||||
form.add_error('value', _('Supplied value must be a boolean'))
|
form.add_error('value', _('Supplied value must be a boolean'))
|
||||||
|
|
||||||
|
|
||||||
|
class UserSettingEdit(SettingEdit):
|
||||||
|
"""
|
||||||
|
View for editing an InvenTree key:value user settings object,
|
||||||
|
(or creating it if the key does not already exist)
|
||||||
|
"""
|
||||||
|
|
||||||
|
model = models.InvenTreeUserSetting
|
||||||
|
ajax_form_title = _('Change User Setting')
|
||||||
|
form_class = forms.SettingEditForm
|
||||||
|
ajax_template_name = "common/edit_setting.html"
|
||||||
|
|
||||||
|
|
||||||
class MultiStepFormView(SessionWizardView):
|
class MultiStepFormView(SessionWizardView):
|
||||||
""" Setup basic methods of multi-step form
|
""" Setup basic methods of multi-step form
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user