Skip to content
Snippets Groups Projects
Commit 4f56c348 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

activity_type is disabled when editing voucher

parent 50714faa
No related branches found
No related tags found
1 merge request!151Resolve "voucher should have optional activy type (free text)"
...@@ -57,6 +57,7 @@ class VoucherForm(ModelForm): ...@@ -57,6 +57,7 @@ class VoucherForm(ModelForm):
if instance and instance.pk: if instance and instance.pk:
self.fields['voucher_type'].widget.attrs['readonly'] = True self.fields['voucher_type'].widget.attrs['readonly'] = True
self.fields['hours'].widget.attrs['readonly'] = True self.fields['hours'].widget.attrs['readonly'] = True
self.fields['activity_type'].widget.attrs['readonly'] = True
self.fields['usage_partner'].widget.attrs['readonly'] = True self.fields['usage_partner'].widget.attrs['readonly'] = True
if instance.status in [VOUCHER_STATUS_USED, VOUCHER_STATUS_EXPIRED]: if instance.status in [VOUCHER_STATUS_USED, VOUCHER_STATUS_EXPIRED]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment