mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 07:41:14 +00:00
com: use MarkdownInput for alert_msg, info_msg and index_page editing
This commit is contained in:
parent
24dd258d0a
commit
dc800b59f4
12
com/views.py
12
com/views.py
@ -167,19 +167,25 @@ class ComEditView(ComTabsMixin, CanEditPropMixin, UpdateView):
|
||||
|
||||
|
||||
class AlertMsgEditView(ComEditView):
|
||||
fields = ["alert_msg"]
|
||||
form_class = modelform_factory(
|
||||
Sith, fields=["alert_msg"], widgets={"alert_msg": MarkdownInput}
|
||||
)
|
||||
current_tab = "alert"
|
||||
success_url = reverse_lazy("com:alert_edit")
|
||||
|
||||
|
||||
class InfoMsgEditView(ComEditView):
|
||||
fields = ["info_msg"]
|
||||
form_class = modelform_factory(
|
||||
Sith, fields=["info_msg"], widgets={"info_msg": MarkdownInput}
|
||||
)
|
||||
current_tab = "info"
|
||||
success_url = reverse_lazy("com:info_edit")
|
||||
|
||||
|
||||
class IndexEditView(ComEditView):
|
||||
fields = ["index_page"]
|
||||
form_class = modelform_factory(
|
||||
Sith, fields=["index_page"], widgets={"index_page": MarkdownInput}
|
||||
)
|
||||
current_tab = "index"
|
||||
success_url = reverse_lazy("com:index_edit")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user