Moved navigation code to its own app
This commit is contained in:
+1
-12
@@ -6,18 +6,7 @@ from django.conf import settings
|
||||
from django.template.defaultfilters import capfirst
|
||||
|
||||
from common.utils import return_attrib
|
||||
|
||||
|
||||
class MultiItemForm(forms.Form):
|
||||
def __init__(self, *args, **kwargs):
|
||||
actions = kwargs.pop('actions', [])
|
||||
super(MultiItemForm, self).__init__(*args, **kwargs)
|
||||
choices = [('', '------')]
|
||||
choices.extend([(action[0], capfirst(action[1])) for action in actions])
|
||||
self.fields['action'].choices = choices
|
||||
|
||||
action = forms.ChoiceField(label=_(u'Multi item action'))
|
||||
|
||||
|
||||
|
||||
class DetailSelectMultiple(forms.widgets.SelectMultiple):
|
||||
def __init__(self, queryset=None, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user