From aa00d31ffe2ec040504b6699213fe60763563fda Mon Sep 17 00:00:00 2001 From: Marc Florisson Date: Wed, 6 Jun 2012 17:44:22 +0200 Subject: pre-select all route's stop on journey_pattern creation form --- app/views/journey_patterns/_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/journey_patterns/_form.html.erb b/app/views/journey_patterns/_form.html.erb index ef2bcc9d2..b6c37ab1b 100644 --- a/app/views/journey_patterns/_form.html.erb +++ b/app/views/journey_patterns/_form.html.erb @@ -4,8 +4,8 @@ <%= form.input :published_name %> <%= form.input :registration_number %> <%= form.input :comment %> - <%= form.input :stop_point_ids, :as => :check_boxes, :collection => @route.stop_points.map { |s| [s.stop_area.name, s.id.to_s]} %> - <% if @route.new_record? %> + <%= form.input :stop_point_ids, :as => :check_boxes, :collection => @route.stop_points.map { |s| [s.stop_area.name, s.id.to_s]}, :input_html => (@journey_pattern.new_record? ? { :checked => 'checked' }:{}) %> + <% if @journey_pattern.new_record? %> <%= form.input :objectid %> <% else %>