Skip to content

Commit 08236b2

Browse files
committed
fix - disabled currency editing when clonning the version
1 parent 39d5184 commit 08236b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cesnet_service_path_plugin/forms/contract_info.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ def __init__(self, *args, **kwargs):
9292
self._previous_version = None
9393

9494
if is_amendment:
95-
# For amendments, make currency read-only in the UI
96-
self.fields['charge_currency'].widget.attrs['readonly'] = True
95+
# For amendments, make currency field disabled in the UI
96+
# Note: disabled fields don't submit values, but we handle this in clean_charge_currency()
97+
self.fields['charge_currency'].disabled = True
9798
self.fields['charge_currency'].help_text = "Currency cannot be changed in amendments (inherited from original contract)"
9899

99100
def clean_charge_currency(self):

0 commit comments

Comments
 (0)