diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-07-15 19:22:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-07-15 19:22:49 +0200 |
commit | 3c4675c7d2f657a5dce8bf55cc8b6a3289197943 (patch) | |
tree | 195f2dba6fccee16cea401e1d440156449476ec3 /archaeological_operations/forms.py | |
parent | 7c5c1f73ba17425c3737e96bbc600be43608b0a2 (diff) | |
download | Ishtar-3c4675c7d2f657a5dce8bf55cc8b6a3289197943.tar.bz2 Ishtar-3c4675c7d2f657a5dce8bf55cc8b6a3289197943.zip |
Clean act type script (refs #1949)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index efbd279ed..0d01c7f0e 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -383,7 +383,9 @@ class OperationFormGeneral(forms.Form): super(OperationFormGeneral, self).__init__(*args, **kwargs) self.fields['operation_type'].choices = models.OperationType.get_types() self.fields['operation_type'].help_text = models.OperationType.get_help() - if kwargs and kwargs['data']: # data POSTED + # data POSTED + if kwargs and kwargs['data'] \ + and 'readonly' in self.fields['operation_code'].widget.attrs: self.fields['operation_code'].widget.attrs.pop('readonly') def clean(self): |