Hide the cancel button and add title/subtitle to notification page
This commit is contained in:
@@ -11,6 +11,11 @@ class NotificationsUpdate(LoginRequiredMixin, ObjectUpdate):
|
||||
model = NotificationSettings
|
||||
form_class = NotificationSettingsForm
|
||||
|
||||
page_title = "Update your notification settings."
|
||||
page_subtitle = (
|
||||
"At least the topic must be set if you want to receive notifications."
|
||||
)
|
||||
|
||||
# list_url_name = "notifications"
|
||||
# list_url_args = ["type"]
|
||||
|
||||
@@ -19,6 +24,8 @@ class NotificationsUpdate(LoginRequiredMixin, ObjectUpdate):
|
||||
|
||||
pk_required = False
|
||||
|
||||
hide_cancel = True
|
||||
|
||||
def get_object(self, **kwargs):
|
||||
notification_settings, _ = NotificationSettings.objects.get_or_create(
|
||||
user=self.request.user
|
||||
|
||||
Reference in New Issue
Block a user