diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-08-08 19:54:34 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-08-08 19:54:34 +0000 |
| commit | 5d199ba90113c47caf142e79151315ba2dc02b4b (patch) | |
| tree | 3e4967fa15499084b0a64236992a31424c326aba /django/contrib/admin/widgets.py | |
| parent | 5fb95990865beeb272691b445f9f1b47a469b55b (diff) | |
Fixed #8163 -- Restore oldforms admin styling on input fields. Also cleaned up some styles for both tabular and stacked inlines. Thanks Nathan Borror for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/widgets.py')
| -rw-r--r-- | django/contrib/admin/widgets.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 1737920312..884171be2e 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -208,3 +208,19 @@ class RelatedFieldWidgetWrapper(forms.Widget): def id_for_label(self, id_): return self.widget.id_for_label(id_) + +class AdminTextareaWidget(forms.Textarea): + def __init__(self, attrs={}): + super(AdminTextareaWidget, self).__init__(attrs={'class': 'vLargeTextField'}) + +class AdminTextInputWidget(forms.TextInput): + def __init__(self, attrs={}): + super(AdminTextInputWidget, self).__init__(attrs={'class': 'vTextField'}) + +class AdminURLFieldWidget(forms.TextInput): + def __init__(self, attrs={}): + super(AdminURLFieldWidget, self).__init__(attrs={'class': 'vURLField'}) + +class AdminIntegerFieldWidget(forms.TextInput): + def __init__(self, attrs={}): + super(AdminIntegerFieldWidget, self).__init__(attrs={'class': 'vIntegerField'})
\ No newline at end of file |
