parent
877a1ca335
commit
78ef1b79af
@ -345,18 +345,3 @@ class EditInterventionForm(NewInterventionForm):
|
|||||||
|
|
||||||
return self.instance
|
return self.instance
|
||||||
|
|
||||||
|
|
||||||
class OpenInterventionForm(EditInterventionForm):
|
|
||||||
"""
|
|
||||||
This form is not intended to be used as data-input form. It's used to simplify the rendering of intervention:open
|
|
||||||
"""
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
# Resize map
|
|
||||||
self.fields["geometry"].widget.attrs["map_width"] = 500
|
|
||||||
self.fields["geometry"].widget.attrs["map_height"] = 300
|
|
||||||
|
|
||||||
# Disable all form fields
|
|
||||||
for field in self.fields:
|
|
||||||
self.disable_form_field(field)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user