Use text inputs instead of text areas for title and authors. Close #7
This commit is contained in:
parent
2016948119
commit
78cb528fe7
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,11 @@ class EditBookForm(forms.ModelForm):
|
|||
|
||||
no_book = forms.BooleanField(label='Pas de livre pour cette classe/matière', required=False, initial=False)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['title'].widget = forms.TextInput()
|
||||
self.fields['authors'].widget = forms.TextInput()
|
||||
|
||||
|
||||
class AddBookForm(EditBookForm):
|
||||
class Meta(EditBookForm.Meta):
|
||||
|
|
Loading…
Reference in a new issue