diff --git a/jarvis/followup/forms.py b/jarvis/followup/forms.py index 6294bad..5fc2f34 100644 --- a/jarvis/followup/forms.py +++ b/jarvis/followup/forms.py @@ -504,10 +504,16 @@ class PlanForm(forms.ModelForm): class NoteForm(forms.ModelForm): class Meta: model = Note - fields = ("gymnast", "coach", "status", "informations", "date") + fields = ("gymnast", "coach", "title", "status", "informations", "date") widgets = { "gymnast": forms.HiddenInput(), "coach": forms.HiddenInput(), + "title": forms.TextInput( + attrs={ + "class": "form-control", + "placeholder": "Note of the week", + } + ), "status": forms.Select(attrs={"class": "form-control selectpicker"}), "date": forms.TextInput( attrs={ diff --git a/jarvis/followup/templates/notes/create.html b/jarvis/followup/templates/notes/create.html index 2255949..a2ee865 100644 --- a/jarvis/followup/templates/notes/create.html +++ b/jarvis/followup/templates/notes/create.html @@ -19,17 +19,25 @@
Bonjour,
-Une nouvelle note vous a été envoyée. Vous pouvez la consulter en liquant ici.
Excellente journée
Jarvis
""", - ) + # if ( + # (new_note.gymnast.user.email or new_note.gymnast.email_trainer) + # and ((not note_id) or (note_id and note.status == 0)) + # and new_note.status == 1 + # ): + # send_mail( + # "Nouvelle note", + # "Une nouvelle note vous a été envoyée", + # settings.EMAIL_HOST_USER, + # [new_note.gymnast.user.email, new_note.gymnast.email_trainer], + # fail_silently=False, + # html_message="""Bonjour,
+ #Une nouvelle note vous a été envoyée. Vous pouvez la consulter en liquant ici.
Excellente journée
Jarvis
""", + # ) return HttpResponseRedirect( reverse("gymnast_details_tab", args=(new_note.gymnast.id, "event")) )