aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLuc Donnet2012-06-25 16:43:27 +0200
committerLuc Donnet2012-06-25 16:43:27 +0200
commit9c2c172d4ab04d6511ab614f943a776a356c1f07 (patch)
treed685b01b4e8253dc1558c2fa4b5937434cc95d92 /app
parent39f4264afd25bfc8fbe3d500975fe7adc7d508c7 (diff)
downloadchouette-core-9c2c172d4ab04d6511ab614f943a776a356c1f07.tar.bz2
Update version of formtastic to 2.1
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/application.js3
-rw-r--r--app/assets/javascripts/jquery.ui.datepicker-i18n.js47
-rw-r--r--app/assets/stylesheets/application.css1
-rw-r--r--app/assets/stylesheets/formtastic.css145
-rw-r--r--app/assets/stylesheets/formtastic_changes.css14
-rw-r--r--app/assets/stylesheets/stop_points.css.scss8
-rw-r--r--app/views/companies/_form.erb9
-rw-r--r--app/views/connection_links/_form.erb9
-rw-r--r--app/views/connection_links/select_areas.html.erb9
-rw-r--r--app/views/journey_patterns/_form.html.erb9
-rw-r--r--app/views/layouts/application.html.erb2
-rw-r--r--app/views/lines/_form.erb9
-rw-r--r--app/views/networks/_form.erb9
-rw-r--r--app/views/referentials/_form.erb12
-rw-r--r--app/views/routes/_form.html.erb9
-rw-r--r--app/views/stop_areas/_form.html.erb8
-rw-r--r--app/views/stop_areas/add_children.html.erb9
-rw-r--r--app/views/stop_areas/select_parent.html.erb9
-rw-r--r--app/views/stop_points/index.html.erb7
-rw-r--r--app/views/time_table_dates/_form.html.erb10
-rw-r--r--app/views/time_table_periods/_form.html.erb9
-rw-r--r--app/views/time_tables/_form.erb9
-rw-r--r--app/views/vehicle_journeys/_form.html.erb9
23 files changed, 117 insertions, 248 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index ebe1bb0e4..86507b03e 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -7,5 +7,6 @@
//= require jquery
//= require jquery_ujs
//= require jquery-ui
+//= require modernizr
+//= require cocoon
//= require_tree .
-//= require cocoon \ No newline at end of file
diff --git a/app/assets/javascripts/jquery.ui.datepicker-i18n.js b/app/assets/javascripts/jquery.ui.datepicker-i18n.js
new file mode 100644
index 000000000..637c7b999
--- /dev/null
+++ b/app/assets/javascripts/jquery.ui.datepicker-i18n.js
@@ -0,0 +1,47 @@
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+jQuery(function($){
+
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: '<Préc',
+ nextText: 'Suiv>',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+
+ $.datepicker.regional['en'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+
+ $.datepicker.setDefaults($.datepicker.regional[ "" ]);
+ $("input[type='date']").datepicker( $.datepicker.regional[ "fr" ] );
+ $("input[type='date']").datepicker( "option", $.datepicker.regional[ $('html').attr('lang') ] );
+
+});
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index b17893104..7a73fd3fe 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -3,6 +3,7 @@
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
+ *= require formtastic
*= require jquery-ui
*= require_tree .
*/ \ No newline at end of file
diff --git a/app/assets/stylesheets/formtastic.css b/app/assets/stylesheets/formtastic.css
deleted file mode 100644
index 91540c74b..000000000
--- a/app/assets/stylesheets/formtastic.css
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -------------------------------------------------------------------------------------------------
-
-It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
-this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
-This will allow you to update formtastic.css with new releases without clobbering your own changes.
-
-This stylesheet forms part of the Formtastic Rails Plugin
-(c) 2008 Justin French
-
---------------------------------------------------------------------------------------------------*/
-
-
-/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
---------------------------------------------------------------------------------------------------*/
-form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
-form.formtastic fieldset { border:0; }
-form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
-form.formtastic ol, form.formtastic ul { list-style:none; }
-form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
-form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
-form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
-form.formtastic legend { white-space:normal; color:#000; }
-
-
-/* SEMANTIC ERRORS
---------------------------------------------------------------------------------------------------*/
-form.formtastic ul.errors { color:#cc0000; margin:0.5em 0 1.5em 25%; list-style:square; }
-form.formtastic ul.errors li { padding:0; border:none; display:list-item; }
-
-
-/* FIELDSETS & LISTS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset { overflow:auto; } /* clearing contained floats */
-form.formtastic fieldset.inputs { }
-form.formtastic fieldset.buttons { padding-left:25%; }
-form.formtastic fieldset ol { }
-form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
-
-/* INPUT LIs
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li { padding:0.5em 0; margin-top:-0.5em; margin-bottom:1em; } /* padding and negative margin juggling is for Firefox */
-form.formtastic fieldset > ol > li { overflow:auto; } /* clearing contained floats */
-
-form.formtastic fieldset > ol > li.required { }
-form.formtastic fieldset > ol > li.optional { }
-form.formtastic fieldset > ol > li.error { }
-
-
-/* LABELS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li label { display:block; width:25%; float:left; padding-top:.2em; }
-form.formtastic fieldset > ol > li > li label { line-height:100%; padding-top:0; }
-form.formtastic fieldset > ol > li > li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
-
-
-/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li fieldset { position:relative; }
-form.formtastic fieldset > ol > li fieldset legend { position:absolute; width:95%; padding-top:0.1em; left: 0px; }
-form.formtastic fieldset > ol > li fieldset legend span { position:absolute; }
-form.formtastic fieldset > ol > li fieldset legend.label label { position:absolute; }
-form.formtastic fieldset > ol > li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
-form.formtastic fieldset > ol > li fieldset ol li { padding:0; border:0; }
-
-
-/* INLINE HINTS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
-
-
-/* INLINE ERRORS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
-form.formtastic fieldset > ol > li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
-form.formtastic fieldset > ol > li ul.errors li { padding:0; border:none; display:list-item; }
-
-
-/* STRING, NUMERIC, PASSWORD, EMAIL, URL, PHONE & SEARCH OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.string input,
-form.formtastic fieldset > ol > li.password input,
-form.formtastic fieldset > ol > li.numeric input,
-form.formtastic fieldset > ol > li.email input,
-form.formtastic fieldset > ol > li.url input,
-form.formtastic fieldset > ol > li.phone input,
-form.formtastic fieldset > ol > li.search input { width:72%; }
-
-form.formtastic fieldset > ol > li.string input[size],
-form.formtastic fieldset > ol > li.password input[size],
-form.formtastic fieldset > ol > li.numeric input[size],
-form.formtastic fieldset > ol > li.email input[size],
-form.formtastic fieldset > ol > li.url input[size],
-form.formtastic fieldset > ol > li.phone input[size],
-form.formtastic fieldset > ol > li.search input[size] { width:auto; max-width:72%; }
-
-
-/* TEXTAREA OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.text textarea { width:72%; }
-form.formtastic fieldset > ol > li.text textarea[cols] { width:auto; max-width:72%; }
-
-
-/* HIDDEN OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.hidden { display:none; }
-
-/* BOOLEAN OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.boolean label { padding-left:25%; width:auto; }
-form.formtastic fieldset > ol > li.boolean label input { margin:0 0.5em 0 0.2em; }
-
-
-/* RADIO OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.radio { }
-form.formtastic fieldset > ol > li.radio fieldset { overflow:visible; }
-form.formtastic fieldset > ol > li.radio fieldset ol { margin-bottom:-0.5em; }
-form.formtastic fieldset > ol > li.radio fieldset ol li { margin:0.1em 0 0.5em 0; overflow:visible; }
-form.formtastic fieldset > ol > li.radio fieldset ol li label { float:none; width:100%; }
-form.formtastic fieldset > ol > li.radio fieldset ol li label input { margin-right:0.2em; }
-
-
-/* CHECK BOXES (COLLECTION) OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.check_boxes { }
-form.formtastic fieldset > ol > li.check_boxes fieldset { overflow:visible; }
-form.formtastic fieldset > ol > li.check_boxes fieldset ol { margin-bottom:-0.5em; }
-form.formtastic fieldset > ol > li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; overflow:visible; }
-form.formtastic fieldset > ol > li.check_boxes fieldset ol li label { float:none; width:100%; }
-form.formtastic fieldset > ol > li.check_boxes fieldset ol li label input { margin-right:0.2em; }
-
-
-/* DATE & TIME OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset > ol > li.date fieldset ol li,
-form.formtastic fieldset > ol > li.time fieldset ol li,
-form.formtastic fieldset > ol > li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
-
-form.formtastic fieldset > ol > li.date fieldset ol li label,
-form.formtastic fieldset > ol > li.time fieldset ol li label,
-form.formtastic fieldset > ol > li.datetime fieldset ol li label { display:none; }
-
-form.formtastic fieldset > ol > li.date fieldset ol li label input,
-form.formtastic fieldset > ol > li.time fieldset ol li label input,
-form.formtastic fieldset > ol > li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }
diff --git a/app/assets/stylesheets/formtastic_changes.css b/app/assets/stylesheets/formtastic_changes.css
deleted file mode 100644
index 8a044fab6..000000000
--- a/app/assets/stylesheets/formtastic_changes.css
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -------------------------------------------------------------------------------------------------
-
-Load this stylesheet after formtastic.css in your layouts to override the CSS to suit your needs.
-This will allow you to update formtastic.css with new releases without clobbering your own changes.
-
-For example, to make the inline hint paragraphs a little darker in color than the standard #666:
-
-form.formtastic fieldset > ol > li p.inline-hints { color:#333; }
-
-HINT:
-The following style may be *conditionally* included for improved support on older versions of IE(<8)
-form.formtastic fieldset ol li fieldset legend { margin-left: -6px;}
-
---------------------------------------------------------------------------------------------------*/
diff --git a/app/assets/stylesheets/stop_points.css.scss b/app/assets/stylesheets/stop_points.css.scss
index 73fc22aef..939ac1070 100644
--- a/app/assets/stylesheets/stop_points.css.scss
+++ b/app/assets/stylesheets/stop_points.css.scss
@@ -15,14 +15,8 @@
.stop_points:after {
@include content_to_clear;
}
-
- .formtastic .buttons {
- a {
- margin-top: 0px;
- }
- }
- .stop_point {
+ #sortable_stop_points .stop_point {
@include div_for_object;
/* to create multi-column index */
width: 350px;
diff --git a/app/views/companies/_form.erb b/app/views/companies/_form.erb
index bea95b0b4..d7274cbd9 100644
--- a/app/views/companies/_form.erb
+++ b/app/views/companies/_form.erb
@@ -19,9 +19,8 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/connection_links/_form.erb b/app/views/connection_links/_form.erb
index 31c3e3bde..50abadce7 100644
--- a/app/views/connection_links/_form.erb
+++ b/app/views/connection_links/_form.erb
@@ -23,9 +23,8 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/connection_links/select_areas.html.erb b/app/views/connection_links/select_areas.html.erb
index 2df3831b4..6c6f4dedf 100644
--- a/app/views/connection_links/select_areas.html.erb
+++ b/app/views/connection_links/select_areas.html.erb
@@ -7,11 +7,10 @@
<%= form.input :arrival_id, :as => :text, :input_html => { :"data-pre" => ( @arrival.present? ? [ { :id => @arrival.id.to_s, :name => "#{@arrival.name} [#{@arrival.country_code}]" } ]: [] ).to_json } %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <%= t('or') %>
- <%= link_to t('cancel'), [@referential, @connection_link] %>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
</div>
<% end %>
diff --git a/app/views/journey_patterns/_form.html.erb b/app/views/journey_patterns/_form.html.erb
index b6c37ab1b..850998830 100644
--- a/app/views/journey_patterns/_form.html.erb
+++ b/app/views/journey_patterns/_form.html.erb
@@ -15,10 +15,9 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 437aad3a7..4318d7484 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html>
+<html lang="<%= I18n.locale %>">
<head>
<title>Chouette V2 - <%= title %></title>
<%= stylesheet_link_tag :application %>
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb
index ed0e4f9a2..400c68b7c 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -19,9 +19,8 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/networks/_form.erb b/app/views/networks/_form.erb
index 32c131ca3..cf1764136 100644
--- a/app/views/networks/_form.erb
+++ b/app/views/networks/_form.erb
@@ -17,9 +17,8 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/referentials/_form.erb b/app/views/referentials/_form.erb
index c82649909..d794d828c 100644
--- a/app/views/referentials/_form.erb
+++ b/app/views/referentials/_form.erb
@@ -16,12 +16,10 @@
<% if @referential.new_record? %>
<%= form.input :resources, :as => :file %>
<% end %>
- <% end %>
+ <% end %>
-
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('back'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/routes/_form.html.erb b/app/views/routes/_form.html.erb
index 96a681b13..5b383a9d9 100644
--- a/app/views/routes/_form.html.erb
+++ b/app/views/routes/_form.html.erb
@@ -17,10 +17,9 @@
<% end %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index 81878101a..c4d4c5797 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -27,8 +27,8 @@
<%= form.input :latitude %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- ou <%= link_to t('cancel'), [@referential, @stop_area] %>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/stop_areas/add_children.html.erb b/app/views/stop_areas/add_children.html.erb
index ff3323dab..6f637086c 100644
--- a/app/views/stop_areas/add_children.html.erb
+++ b/app/views/stop_areas/add_children.html.erb
@@ -6,11 +6,10 @@
<%= form.input :children_ids, :as => :text, :input_html => { :"data-pre" => ( @children.map { |child| { :id => child.id.to_s, :name => "#{child.name} #{child.country_code}" } } ).to_json } %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <%= t('or') %>
- <%= link_to t('cancel'), [@referential, @stop_area] %>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
</div>
<% end %>
diff --git a/app/views/stop_areas/select_parent.html.erb b/app/views/stop_areas/select_parent.html.erb
index 26baf984a..fedd83446 100644
--- a/app/views/stop_areas/select_parent.html.erb
+++ b/app/views/stop_areas/select_parent.html.erb
@@ -6,11 +6,10 @@
<%= form.input :parent_id, :as => :text, :input_html => { :"data-pre" => ( @parent.present? ? [ { :id => @parent.id.to_s, :name => "#{@parent.name} #{@parent.country_code}" } ]: [] ).to_json } %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <%= t('or') %>
- <%= link_to t('cancel'), [@referential, @stop_area] %>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
</div>
<% end %>
diff --git a/app/views/stop_points/index.html.erb b/app/views/stop_points/index.html.erb
index 6f3b69ae0..486aefb5f 100644
--- a/app/views/stop_points/index.html.erb
+++ b/app/views/stop_points/index.html.erb
@@ -26,10 +26,9 @@
<% @stop_points.each do |sp| %>
<input type="hidden" id="<%= "pos_#{sp.position}" %>" name="stop_point[]" value="<%= sp.id %>" />
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button t('.reorder_button') %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), referential_line_route_stop_points_path(@referential, @line, @route) %></li>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button, :label => t('.reorder_button') %>
+ <%= form.action :cancel, :as => :link , :url => referential_line_route_stop_points_path(@referential, @line, @route) %>
<% end %>
<% end %>
</div>
diff --git a/app/views/time_table_dates/_form.html.erb b/app/views/time_table_dates/_form.html.erb
index c0218eb64..decc0b3cc 100644
--- a/app/views/time_table_dates/_form.html.erb
+++ b/app/views/time_table_dates/_form.html.erb
@@ -1,11 +1,11 @@
<%= semantic_form_for [@referential, @time_table, @time_table_date] do |form| %>
<%= form.inputs do %>
<%= form.input :date, :as => :date, :label => @time_table_date.human_attribute_name("date") %>
+
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/time_table_periods/_form.html.erb b/app/views/time_table_periods/_form.html.erb
index 6f390c7d5..71f8f3fd1 100644
--- a/app/views/time_table_periods/_form.html.erb
+++ b/app/views/time_table_periods/_form.html.erb
@@ -3,10 +3,9 @@
<%= form.input :period_start, :as => :date, :label => @time_table_period.human_attribute_name("period_start") %>
<%= form.input :period_end, :as => :date, :label => @time_table_period.human_attribute_name("period_end") %>
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
diff --git a/app/views/time_tables/_form.erb b/app/views/time_tables/_form.erb
index 59cc30947..f72e081da 100644
--- a/app/views/time_tables/_form.erb
+++ b/app/views/time_tables/_form.erb
@@ -24,11 +24,10 @@
<% end %>
<% end %>
<p/>
- <%= form.buttons do %>
- <%= form.commit_button %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
<h3 class="dates"><%= t('.dates') %></h3>
<%= render "dates" %>
diff --git a/app/views/vehicle_journeys/_form.html.erb b/app/views/vehicle_journeys/_form.html.erb
index 582253b0f..f314e0453 100644
--- a/app/views/vehicle_journeys/_form.html.erb
+++ b/app/views/vehicle_journeys/_form.html.erb
@@ -48,11 +48,10 @@
<% end %>
- <%= form.buttons do %>
- <%= form.commit_button true %>
- <li><%= t('or') %></li>
- <li><%= link_to t('cancel'), :back %></li>
- <% end %>
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
<% end %>
<% unless @vehicle_journey.new_record? %>