def __init__(self, *args, **kwargs): super(BaseTrekForm, self).__init__(*args, **kwargs) self.fields['topology'].widget = LineTopologyWidget() self.fields['points_reference'].label = '' self.fields['points_reference'].widget.target_map = 'topology' self.fields['parking_location'].label = '' self.fields['parking_location'].widget.target_map = 'topology'
def __init__(self, *args, **kwargs): super(TrekForm, self).__init__(*args, **kwargs) self.fields['topology'].widget = LineTopologyWidget() self.fields['web_links'].widget = SelectMultipleWithPop(choices=self.fields['web_links'].choices, add_url=WebLink.get_add_url()) # Make sure (force) that name is required, in default language only self.fields['name_%s' % settings.LANGUAGE_CODE].required = True
def __init__(self, *args, **kwargs): super(BaseTrekForm, self).__init__(*args, **kwargs) modifiable = self.fields['topology'].widget.modifiable # TODO: We should change LeafletWidget to keep modifiable. # Init of TopologyForm -> commonForm -> mapentityForm # already add a leafletwidget with modifiable self.fields['topology'].widget = LineTopologyWidget() self.fields['topology'].widget.modifiable = modifiable self.fields['points_reference'].label = '' self.fields['points_reference'].widget.target_map = 'topology' self.fields['parking_location'].label = '' self.fields['parking_location'].widget.target_map = 'topology'
def __init__(self, *args, **kwargs): super(TrailForm, self).__init__(*args, **kwargs) self.fields['topology'].widget = LineTopologyWidget()
def __init__(self, *args, **kwargs): super(EdgeForm, self).__init__(*args, **kwargs) modifiable = self.fields['topology'].widget.modifiable self.fields['topology'].widget = LineTopologyWidget() self.fields['topology'].widget.modifiable = modifiable