add autofocus
This commit is contained in:
@@ -75,6 +75,8 @@ class BillCreateForm(forms.ModelForm):
|
||||
self.fields["invoice"].rows = 3
|
||||
|
||||
# bank data fields
|
||||
self.fields["payer"].autofocus = True
|
||||
|
||||
self.fields["name_text"].label = "Kontoinhaber:in"
|
||||
self.fields["name_text"].required = False
|
||||
|
||||
@@ -221,6 +223,8 @@ class BillUpdateForm(forms.ModelForm):
|
||||
if kwargs["instance"].status != "S":
|
||||
self.fields["comment"].disabled = True
|
||||
|
||||
self.fields["comment"].autofocus = True
|
||||
|
||||
|
||||
class ResolutionCreateForm(forms.ModelForm):
|
||||
class Meta:
|
||||
@@ -244,6 +248,11 @@ class ResolutionCreateForm(forms.ModelForm):
|
||||
"date": DateInput(format=("%Y-%m-%d")),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs) # to get the self.fields set
|
||||
|
||||
self.fields["option"].autofocus = True
|
||||
|
||||
|
||||
class BillInlineForm(forms.ModelForm):
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user