aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-01-29 16:38:50 +0100
committerZog2018-02-01 13:48:40 +0100
commita66713dcfd4f487184dc39695410ed75adfb1e14 (patch)
tree005ea7ece3e44b3faad3d79b652ab3674885aa33
parent972e988e0f52a6ee69bf97c112be28e6f852be00 (diff)
downloadchouette-core-a66713dcfd4f487184dc39695410ed75adfb1e14.tar.bz2
Refs #5762; Make coordinates optional on stop areas
-rw-r--r--app/models/chouette/stop_area.rb4
-rw-r--r--app/views/stop_areas/_form.html.slim2
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb
index d7d5c2eb2..c6feaf940 100644
--- a/app/models/chouette/stop_area.rb
+++ b/app/models/chouette/stop_area.rb
@@ -106,9 +106,7 @@ module Chouette
end
end
- def local_id
- id.to_s
- end
+ alias_method :local_id, :user_objectid
def children_in_depth
return [] if self.children.empty?
diff --git a/app/views/stop_areas/_form.html.slim b/app/views/stop_areas/_form.html.slim
index aa156f7bd..1bc3e77ef 100644
--- a/app/views/stop_areas/_form.html.slim
+++ b/app/views/stop_areas/_form.html.slim
@@ -23,7 +23,7 @@
- unless @stop_area.projection.blank? or @stop_area.projection_type_label.empty?
= f.input :projection_xy, :label => t("activerecord.attributes.stop_area.projection_xy", :projection => @referential.projection_type_label), :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.projection_xy")}
- = f.input :coordinates, :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.coordinates")}, required: true
+ = f.input :coordinates, :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.coordinates")}
= f.input :street_name
= f.input :zip_code, :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.zip_code")}
= f.input :city_name, required: format_restriction_for_locales(@referential) == '.hub', :input_html => {:title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.city_name")}