Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better arrangement of imageset item fields

  • Loading branch information...
commit 86e0123fca8eb934b48ef936d77e2971919e0dd2 1 parent 22e1622
@evildmp authored
Showing with 19 additions and 17 deletions.
  1. +19 −17 arkestra_image_plugin/cms_plugins.py
View
36 arkestra_image_plugin/cms_plugins.py
@@ -336,16 +336,12 @@ def clean(self):
class ImageSetItemEditor(SupplyRequestMixin, admin.StackedInline, AutocompleteMixin):
form = ImageSetItemPluginForm
- # formset = ImageSetItemFormFormSet
- # related_search_fields = ['destination_content_type']
model=ImageSetItem
extra=1
-
fieldset_basic = ('', {'fields': ((
'image',
- 'inline_item_ordering',
- 'active',
+ 'alt_text',
),)})
fieldset_advanced = ('Caption', {
'fields': (
@@ -354,19 +350,25 @@ class ImageSetItemEditor(SupplyRequestMixin, admin.StackedInline, AutocompleteMi
),
'classes': ('collapse',)
})
+ fieldset_control = ('Control', {
+ 'fields': (
+ ( 'inline_item_ordering', 'active'),
+ ),
+ 'classes': ('collapse',)
+ })
fieldsets = (
- fieldset_basic,
- fieldset_advanced,
- ("Link", {
- 'fields': (
- ('destination_content_type', 'destination_object_id',),
- 'alt_text',
- ('auto_link_title', 'manual_link_title'), ( 'auto_link_description', 'manual_link_description'),
- ),
- 'description': "Links will only be applied if <em>all</em> images in the set have links.",
- 'classes': ('collapse',),
- }),
-)
+ fieldset_basic,
+ fieldset_advanced,
+ ("Link", {
+ 'fields': (
+ ('destination_content_type', 'destination_object_id',),
+ ('auto_link_title', 'manual_link_title'), ( 'auto_link_description', 'manual_link_description'),
+ ),
+ 'description': "Links will only be applied if <em>all</em> images in the set have links.",
+ 'classes': ('collapse',),
+ }),
+ fieldset_control,
+ )
formfield_overrides = {
models.TextField: {'widget': forms.Textarea(attrs={'cols':30, 'rows':3,},),},
}
Please sign in to comment.
Something went wrong with that request. Please try again.