- Add announcements view using JSX to the dashboard sidebar - Create a new maintenance interface to edit and manage announcements - Adds an override to main.html template to include new skip links - Add plugins required for announcements to TinyMCE This is motivated by a desire to have system wide messages for students that show on the dashboard. Enabled with FEATURES['ENABLE_ANNOUNCEMENTS']. Global staff are allowed to edit from the studio maintenance view.
20 lines
422 B
Python
20 lines
422 B
Python
"""
|
|
Forms for the Announcement Editor
|
|
"""
|
|
|
|
from django import forms
|
|
|
|
from .models import Announcement
|
|
|
|
|
|
class AnnouncementForm(forms.ModelForm):
|
|
"""
|
|
Form for editing Announcements
|
|
"""
|
|
content = forms.CharField(widget=forms.Textarea, label='', required=False)
|
|
active = forms.BooleanField(initial=True, required=False)
|
|
|
|
class Meta:
|
|
model = Announcement
|
|
fields = ['content', 'active']
|