20 lines
574 B
Python
20 lines
574 B
Python
from django import forms
|
|
from .models import ChatMessage
|
|
|
|
class QuickResponseForm(forms.ModelForm):
|
|
"""Form für schnelle Antworten im Chat"""
|
|
|
|
class Meta:
|
|
model = ChatMessage
|
|
fields = ['content']
|
|
widgets = {
|
|
'content': forms.Textarea(attrs={
|
|
'class': 'form-control',
|
|
'rows': 3,
|
|
'placeholder': 'Ihre Nachricht...'
|
|
})
|
|
}
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.fields['content'].label = 'Nachricht' |