aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/routing_constraint_zones
diff options
context:
space:
mode:
authorjpl2017-06-14 15:40:52 +0200
committerjpl2017-06-14 15:40:59 +0200
commit03cc12b4954519bc1a6c6ecf3c1051dceb4fc507 (patch)
treea1b3b0c9b04e644c778520a2ffe483e8a39b5c04 /app/views/routing_constraint_zones
parentcbdc2ad9f7d51c9a5cf17d76a1025475377a04b8 (diff)
downloadchouette-core-03cc12b4954519bc1a6c6ecf3c1051dceb4fc507.tar.bz2
Refs #3487: updating form adding JS management for stop_points_ids
Diffstat (limited to 'app/views/routing_constraint_zones')
-rw-r--r--app/views/routing_constraint_zones/_form.html.slim19
1 files changed, 15 insertions, 4 deletions
diff --git a/app/views/routing_constraint_zones/_form.html.slim b/app/views/routing_constraint_zones/_form.html.slim
index 082e8f7f8..3d4764ef7 100644
--- a/app/views/routing_constraint_zones/_form.html.slim
+++ b/app/views/routing_constraint_zones/_form.html.slim
@@ -3,12 +3,23 @@
.row
.col-lg-12
= form.input :name
-
= form.input :route_id, collection: @line.routes.select { |route| route.stop_points.count > 2 }, include_blank: false
- - stop_points_collection = @routing_constraint_zone.persisted? ? @routing_constraint_zone.route.stop_points : []
- = form.input :stop_point_ids, as: :select, collection: stop_points_collection, selected: @routing_constraint_zone.stop_point_ids, label: Chouette::StopPoint.model_name.human.pluralize.capitalize, label_method: :name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Sélection des arrêts sur séquence d\'arrêts', 'multiple': 'multiple', style: 'width: 100%' }
+ .separator
- = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'itl_form'
+ #ITL_stoppoints
+ .subform
+ .nested-head
+ .wrapper
+ div
+ .form-group
+ label.control-label Arrêt
+ div
+ .form-group
+ label.control-label Commune
+ div
= hidden_field_tag 'stop_point_ids', @routing_constraint_zone.stop_point_ids.to_s, id: 'stop_point_ids'
+
+
+ = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'itl_form'