mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-08-14 00:48:32 +02:00
* Added force_insert and force_update parameters to model save() overrides (as per Django rev 8670)
* Added 'UserSettings' model to provide a user profile system independent of existing Django user profiles, for two reasons: 1) Avoids users having to update settings.py and 2) Allows jutda-helpdesk to integrate with websites who already use a User Profile * Settings added in this revision allow a user to control e-mail alerts, and to determine whether they see the dashboard or ticket list at login. * New 'Settings' link in page footer for signed-in users * Logout now takes you to the Helpdesk homepage * Fixed file attachment bug in management/commands/get_email.py which seemed to have been un-done (fixes issue # 4. Jutda-helpdesk is now compatible with Django 1.0!
This commit is contained in:
27
forms.py
27
forms.py
@ -112,7 +112,7 @@ class TicketForm(forms.Form):
|
||||
fail_silently=True,
|
||||
)
|
||||
|
||||
if t.assigned_to and t.assigned_to != user:
|
||||
if t.assigned_to and t.assigned_to != user and getattr(t.assigned_to.usersettings.settings, 'email_on_ticket_assign', False):
|
||||
send_templated_mail(
|
||||
'assigned_owner',
|
||||
context,
|
||||
@ -240,3 +240,28 @@ class PublicTicketForm(forms.Form):
|
||||
|
||||
return t
|
||||
|
||||
|
||||
class UserSettingsForm(forms.Form):
|
||||
login_view_ticketlist = forms.BooleanField(
|
||||
label=_('Show Ticket List on Login?'),
|
||||
help_text=_('Display the ticket list upon login? Otherwise, the dashboard is shown.'),
|
||||
required=False,
|
||||
)
|
||||
|
||||
email_on_ticket_change = forms.BooleanField(
|
||||
label=_('E-mail me on ticket change?'),
|
||||
help_text=_('If you\'re the ticket owner and the ticket is changed via the web by somebody else, do you want to receive an e-mail?'),
|
||||
required=False,
|
||||
)
|
||||
|
||||
email_on_ticket_assign = forms.BooleanField(
|
||||
label=_('E-mail me when assigned a ticket?'),
|
||||
help_text=_('If you are assigned a ticket via the web, do you want to receive an e-mail?'),
|
||||
required=False,
|
||||
)
|
||||
|
||||
email_on_ticket_apichange = forms.BooleanField(
|
||||
label=_('E-mail me when a ticket is changed via the API?'),
|
||||
help_text=_('If a ticket is altered by the API, do you want to receive an e-mail?'),
|
||||
required=False,
|
||||
)
|
||||
|
Reference in New Issue
Block a user