diff --git a/nsupdate/accounts/forms.py b/nsupdate/accounts/forms.py index 1e5c031..c41b61b 100644 --- a/nsupdate/accounts/forms.py +++ b/nsupdate/accounts/forms.py @@ -8,3 +8,6 @@ class UserProfileForm(forms.ModelForm): class Meta(object): model = User fields = ['first_name', 'last_name', 'email'] + widgets = { + 'email': forms.widgets.TextInput(attrs=dict(autofocus=None)), + } diff --git a/nsupdate/main/forms.py b/nsupdate/main/forms.py index 0a916d4..629dc9f 100644 --- a/nsupdate/main/forms.py +++ b/nsupdate/main/forms.py @@ -8,6 +8,9 @@ class CreateHostForm(forms.ModelForm): class Meta(object): model = Host fields = ['subdomain', 'domain', 'comment'] + widgets = { + 'subdomain': forms.widgets.TextInput(attrs=dict(autofocus=None)), + } class EditHostForm(forms.ModelForm): @@ -20,3 +23,6 @@ class CreateDomainForm(forms.ModelForm): class Meta(object): model = Domain exclude = ['created_by'] + widgets = { + 'domain': forms.widgets.TextInput(attrs=dict(autofocus=None)), + } diff --git a/nsupdate/main/templates/main/host.html b/nsupdate/main/templates/main/host.html index 1377cfb..3551ea7 100644 --- a/nsupdate/main/templates/main/host.html +++ b/nsupdate/main/templates/main/host.html @@ -39,7 +39,7 @@ - +