Issue #56, #97, Make multi item links a drop down list of actions, remove unused code

This commit is contained in:
Roberto Rosario
2014-10-27 16:26:13 -04:00
parent b166d559ed
commit a728690335
17 changed files with 33 additions and 80 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ class MultiItemForm(forms.Form):
def __init__(self, *args, **kwargs):
actions = kwargs.pop('actions', [])
super(MultiItemForm, self).__init__(*args, **kwargs)
choices = [('', '------')]
choices = []
choices.extend([(action[0], action[1]) for action in actions])
self.fields['action'].choices = choices
action = forms.ChoiceField(label=_(u'Multi item action'))
action = forms.ChoiceField(label=_(u'Action'), required=False)