From: Yoan Le Clanche Date: Mon, 28 Aug 2023 09:00:37 +0000 (+0200) Subject: Add author field to script form in admin X-Git-Tag: 2.9.0~57 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=acc3ac9aa7a71094e48180d660119093c27718a1;p=teleforma.git Add author field to script form in admin --- diff --git a/teleforma/exam/admin.py b/teleforma/exam/admin.py index 83998e16..071a71ba 100644 --- a/teleforma/exam/admin.py +++ b/teleforma/exam/admin.py @@ -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'] diff --git a/teleforma/static/admin/css/admin-extra.css b/teleforma/static/admin/css/admin-extra.css index e8ad43fc..231ba85b 100644 --- a/teleforma/static/admin/css/admin-extra.css +++ b/teleforma/static/admin/css/admin-extra.css @@ -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