73
73
def __init__(self, request, *args, **kwargs):
74
74
super(UpdateRule, self).__init__(request, *args, **kwargs)
77
78
action = kwargs['initial']['action'].upper()
79
80
protocol_choices = [(protocol, protocol)]
80
for tup in [('TCP', _('TCP')), ('UDP', _('UDP')), ('ICMP', _('ICMP'))]:
81
for tup in [('TCP', _('TCP')), ('UDP', _('UDP')), ('ICMP', _('ICMP')),
82
84
protocol_choices.append(tup)
83
85
self.fields['protocol'].choices = protocol_choices