]> git.parisson.com Git - teleforma.git/commitdiff
fix recipient was always admin
authorYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 25 Jan 2019 16:25:00 +0000 (17:25 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Fri, 25 Jan 2019 16:25:00 +0000 (17:25 +0100)
teleforma/templates/postman/base_write.html

index a68b6086fdbf22bee538753784b3612d8a5d039b..23ba98ed947c42ba96511f85faefb29c2c1294fe 100644 (file)
                     $option.show();
             });
             // fill the hidden field
-            if($('#_professorSelect').val() && $('#_courseSelect').val())
+            if($('#_professorSelect').val() && $('#_courseSelect').val() && recipientCategory === 'prof')
                 $("#id_recipients").val($('#_professorSelect').val());
-            if($('#_adminSelect').val())
+            if($('#_adminSelect').val() && recipientCategory === 'admin')
                 $("#id_recipients").val($('#_adminSelect').val());
         }