]> git.parisson.com Git - teleforma.git/commitdiff
Add author field to script form in admin
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 28 Aug 2023 09:00:37 +0000 (11:00 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 28 Aug 2023 09:00:37 +0000 (11:00 +0200)
teleforma/exam/admin.py
teleforma/static/admin/css/admin-extra.css

index 83998e16f87e3cbd4082ec55b444d3cb88e9f412..071a71ba926c4bfaf4d8eeba3678fe0055c21eae 100644 (file)
@@ -43,7 +43,8 @@ class ScriptAdmin(admin.ModelAdmin):
     ordering = ['-date_added']
     search_fields = ['author__username', 'author__last_name', 'corrector__username',
                     'corrector__last_name', 'course__title', 'course__code']
-    readonly_fields = ['date_added','uuid','box_uuid','sha1','mime_type', 'author']
+    readonly_fields = ['date_added','uuid','box_uuid','sha1','mime_type']
+    autocomplete_fields = ['author']
     list_filter = ['period', 'course__title', 'session', 'type', 'status',
                     'date_submitted', 'date_marked', 'date_rejected',
                    'author__student__platform_only']
index e8ad43fcc922d9b6ef0da500a43aacbf91df26a9..231ba85b4e4d6c27f734298faca473e3db7293d1 100644 (file)
@@ -1,3 +1,7 @@
+:root {
+  --border-color: #aaa;
+}
+
 @media screen and (max-width: 2200px) {
   .related-widget-wrapper .selector-available,
   .related-widget-wrapper .selector-chosen {
@@ -28,4 +32,4 @@
   .related-widget-wrapper .selector-remove:hover {
     background-position: 0 -16px;
   }
-}
+}
\ No newline at end of file