aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorZog2018-01-29 16:38:50 +0100
committercedricnjanga2018-02-06 11:10:18 -0800
commit6fb07ac6da9c98a8643c40fbe38360153100be83 (patch)
tree08c13224faf4e42b0da22c23c5cd950320e09c70 /app
parent5a43a7f610395a6c4a09163959c4987c7a61bd28 (diff)
downloadchouette-core-6fb07ac6da9c98a8643c40fbe38360153100be83.tar.bz2
Refs #5762; Make coordinates optional on stop areas
Diffstat (limited to 'app')
-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")}