feat(Champ.carte): some error style on carte
This commit is contained in:
parent
4d90b1f662
commit
d8a8fb53ce
3 changed files with 22 additions and 9 deletions
|
@ -1,5 +1,8 @@
|
|||
class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent
|
||||
include ApplicationHelper
|
||||
def dsfr_champ_container
|
||||
:fieldset
|
||||
end
|
||||
|
||||
def initialize(**args)
|
||||
super(**args)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
= render @autocomplete_component
|
||||
.fr-fieldset__element
|
||||
= render @autocomplete_component
|
||||
|
||||
= react_component("MapEditor",
|
||||
featureCollection: @champ.to_feature_collection,
|
||||
url: champs_carte_features_path(@champ),
|
||||
options: @champ.render_options,
|
||||
autocompleteAnnounceTemplateId: @autocomplete_component.announce_template_id,
|
||||
autocompleteScreenReaderInstructions: t("combo_search_component.screen_reader_instructions"))
|
||||
= react_component("MapEditor",
|
||||
{ featureCollection: @champ.to_feature_collection,
|
||||
url: champs_carte_features_path(@champ),
|
||||
options: @champ.render_options,
|
||||
autocompleteAnnounceTemplateId: @autocomplete_component.announce_template_id,
|
||||
autocompleteScreenReaderInstructions: t("combo_search_component.screen_reader_instructions") },
|
||||
{class: 'width-100'})
|
||||
|
||||
.geo-areas{ id: dom_id(@champ, :geo_areas) }
|
||||
= render Dossiers::GeoAreasComponent.new(champ: @champ, editing: true)
|
||||
.geo-areas{ id: dom_id(@champ, :geo_areas) }
|
||||
= render Dossiers::GeoAreasComponent.new(champ: @champ, editing: true)
|
||||
|
|
|
@ -3,6 +3,14 @@ class Champs::CarteChamp < Champ
|
|||
DEFAULT_LON = 2.428462
|
||||
DEFAULT_LAT = 46.538192
|
||||
|
||||
def legend_label?
|
||||
true
|
||||
end
|
||||
|
||||
def html_label?
|
||||
false
|
||||
end
|
||||
|
||||
# We are not using scopes here as we want to access
|
||||
# the following collections on unsaved records.
|
||||
def cadastres
|
||||
|
|
Loading…
Add table
Reference in a new issue