]> git.parisson.com Git - teleforma.git/commitdiff
fix send mail to administrators
authorYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 27 Dec 2018 14:27:46 +0000 (15:27 +0100)
committerYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 27 Dec 2018 14:27:46 +0000 (15:27 +0100)
teleforma/forms.py
teleforma/templates/postman/base_write.html

index 3e35d60d013b235b2f67344d6ca326c861745bd9..2e25878a4fcc24f0bd1726504feffeb053b9e1f3 100644 (file)
@@ -102,7 +102,7 @@ class NewsItemForm(ModelForm):
 
 class WriteForm(PostmanWriteForm):
     recipients = BasicCommaSeparatedUserField(label=(_("Recipients"), _("Recipient")), help_text='')
-    course = ModelChoiceField(queryset=Course.objects.all())
+    course = ModelChoiceField(queryset=Course.objects.all(), required=False)
 
     class Meta(PostmanWriteForm.Meta):
         fields = ('course', 'recipients', 'subject', 'body')
index ac24853708f7f44051c8a57592af2fd65119d49d..a68b6086fdbf22bee538753784b3612d8a5d039b 100644 (file)
@@ -37,7 +37,6 @@
 
                 <div id="category-admin">
                     <select id="_adminSelect" name="admins">
-                        <option value="">{% trans "to an administrator" %}</option>
                         {% get_all_admins as admins %}
                         {% for a in admins %}
                             <option value="{{ a.username }}" {% if request.POST.admins == a.username %}selected{% endif %}>{{ a.first_name }} {{ a.last_name }}</option>
                 if(courses && courses.indexOf(course) >= 0)
                     $option.show();
             });
-
             // fill the hidden field
             if($('#_professorSelect').val() && $('#_courseSelect').val())
                 $("#id_recipients").val($('#_professorSelect').val());