aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Perles2016-01-06 15:44:57 +0100
committerBruno Perles2016-01-06 15:44:57 +0100
commit535ba968fec8b4fae148312f9b48d4364461cc70 (patch)
tree609342a889aa2a82a598a4cda3c1ff07d5d9007d
parent63cb330fda5cedcb3455a06b6bb3af7da779a1f8 (diff)
downloadchouette-core-535ba968fec8b4fae148312f9b48d4364461cc70.tar.bz2
Add * to specific fields for Hub format : #40438
-rw-r--r--app/views/stop_areas/_form.html.erb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index dd4a1ea6a..e977a0279 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -19,9 +19,9 @@
<% end %>
<%= form.input :coordinates, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.coordinates")} %>
<%= form.input :street_name %>
- <%= form.input :country_code %>
+ <%= form.input :country_code, required: format_restriction_for_locales(@referential) == '.hub' %>
<%= form.input :zip_code, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.zip_code")} %>
- <%= form.input :city_name, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.city_name")} %>
+ <%= form.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")} %>
</div>
<% end %>
</div>
@@ -30,7 +30,7 @@
<h3><%= t("stop_area.general") %></h3>
<%= form.inputs do %>
<%= form.input :objectid, :required => !@stop_area.new_record?, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.objectid")} %>
- <%= form.input :registration_number, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.registration_number")} %>
+ <%= form.input :registration_number, required: format_restriction_for_locales(@referential) == '.hub', :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.registration_number")} %>
<%= form.input :fare_code, :as => :number %>
<%= form.input :nearest_topic_name, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.nearest_topic_name")} %>
<%= form.input :comment, :as => :text, :input_html => { :rows => 5, :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.stop_area.comment") } %>