diff options
| author | jpl | 2017-06-16 11:37:20 +0200 | 
|---|---|---|
| committer | jpl | 2017-06-16 11:37:20 +0200 | 
| commit | 0b6371b7248a2a731683d20f8b8bc12eb5f35bad (patch) | |
| tree | 3d2859a7a585edea1bfba4a9404ef06f278701ef /app/views | |
| parent | 1e38848dc427f7fe5bd5b0079c2fb9b1d491dca2 (diff) | |
| download | chouette-core-0b6371b7248a2a731683d20f8b8bc12eb5f35bad.tar.bz2 | |
Refs #3789: changing select input by select2 one
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/calendars/_form.html.slim | 4 | ||||
| -rw-r--r-- | app/views/routes/_form.html.slim | 4 | ||||
| -rw-r--r-- | app/views/time_table_combinations/_form.html.slim | 12 | ||||
| -rw-r--r-- | app/views/time_tables/_form.html.slim | 2 | 
4 files changed, 11 insertions, 11 deletions
| diff --git a/app/views/calendars/_form.html.slim b/app/views/calendars/_form.html.slim index 9aed9f7d8..3c152c61d 100644 --- a/app/views/calendars/_form.html.slim +++ b/app/views/calendars/_form.html.slim @@ -6,8 +6,8 @@        - if policy(@calendar).share?          .form-group.has_switch -          = f.label :shared, class: 'col-sm-4 control-label' -          = f.input :shared, as: :boolean, checked_value: true, unchecked_value: false, label: content_tag(:span, t("#{@calendar.shared}"), class: 'switch-label', data: {checkedValue: t('true'), uncheckedValue: t('false')}), wrapper_html: { class: 'col-sm-8'} +          = f.label :shared, class: 'col-sm-4 col-xs-5 control-label' +          = f.input :shared, as: :boolean, checked_value: true, unchecked_value: false, label: content_tag(:span, t("#{@calendar.shared}"), class: 'switch-label', data: {checkedValue: t('true'), uncheckedValue: t('false')}), wrapper_html: { class: 'col-sm-8 col-xs-7'}    .separator diff --git a/app/views/routes/_form.html.slim b/app/views/routes/_form.html.slim index ad389c482..bee86f91e 100644 --- a/app/views/routes/_form.html.slim +++ b/app/views/routes/_form.html.slim @@ -6,8 +6,8 @@        = f.input :published_name        .form-group.has_switch -        = f.label :wayback, class: 'col-sm-4 control-label' -        = f.input :wayback, as: :boolean, checked_value: :straight_forward, unchecked_value: :backward, label: content_tag(:span, @route.wayback_text, class: 'switch-label', data: {checkedValue: t('enumerize.route.direction.straight_forward'), uncheckedValue: t('enumerize.route.direction.backward')}), wrapper_html: { class: 'col-sm-8'} +        = f.label :wayback, class: 'col-sm-4 col-xs-5 control-label' +        = f.input :wayback, as: :boolean, checked_value: :straight_forward, unchecked_value: :backward, label: content_tag(:span, @route.wayback_text, class: 'switch-label', data: {checkedValue: t('enumerize.route.direction.straight_forward'), uncheckedValue: t('enumerize.route.direction.backward')}), wrapper_html: { class: 'col-sm-8 col-xs-7'}        = f.input :opposite_route_id, collection: @forward, disabled: @route.wayback.straight_forward?, wrapper_html: {class: input_opposite_route_id_css(@route, 'straight_forward')} diff --git a/app/views/time_table_combinations/_form.html.slim b/app/views/time_table_combinations/_form.html.slim index d8bebf0c4..b4f818828 100644 --- a/app/views/time_table_combinations/_form.html.slim +++ b/app/views/time_table_combinations/_form.html.slim @@ -2,21 +2,21 @@    .row      .col-lg-12        .form-group.has_switch -        = f.label :combined_type, class: 'col-sm-4 control-label required' do +        = f.label :combined_type, class: 'col-sm-4 col-xs-5 control-label required' do            = 'Type de calendriers '            abbr title='Champ requis' * -        = f.input :combined_type, as: :boolean, checked_value: 'time_table', unchecked_value: 'calendar', required: false, label: content_tag(:span, t("time_table_combinations.combined_type.#{@combination.combined_type}"), class: 'switch-label', data: { checkedValue: 'Calendriers', uncheckedValue: 'Modèles de calendriers' }), wrapper_html: { class: 'col-sm-8' } +        = f.input :combined_type, as: :boolean, checked_value: 'time_table', unchecked_value: 'calendar', required: false, label: content_tag(:span, t("time_table_combinations.combined_type.#{@combination.combined_type}"), class: 'switch-label', data: { checkedValue: 'Calendriers', uncheckedValue: 'Modèles de calendriers' }), wrapper_html: { class: 'col-sm-8 col-xs-7' } -      = f.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', term: 'comment_or_objectid_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json)}}, wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''} +      = f.input :time_table_id, as: :select, input_html: {class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un calendrier...', term: 'comment_or_objectid_cont', url: referential_autocomplete_time_tables_path(@referential, format: :json)}}, wrapper_html: {class: @combination.combined_type != 'time_table' ? 'hidden' : ''} -      = f.input :calendar_id, as: :select, input_html: { class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', term: 'name_cont', url: autocomplete_calendars_path}}, wrapper_html: {class: @combination.combined_type != 'calendar' ? 'hidden' : ''} +      = f.input :calendar_id, as: :select, input_html: { class: 'tt_combination_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un modèle de calendrier...', term: 'name_cont', url: autocomplete_calendars_path}}, wrapper_html: {class: @combination.combined_type != 'calendar' ? 'hidden' : ''}    .separator    .row      .col-lg-12 -      = f.label :operation, class: 'col-sm-4 control-label' -      = f.input :operation, as: :radio_buttons, label: false, collection: TimeTableCombination.operations, label_method: lambda{|o| t("time_table_combinations.operations.#{o}")}, wrapper_html: { class: 'col-sm-8' } +      = f.label :operation, class: 'col-sm-4 col-xs-5 control-label' +      = f.input :operation, as: :radio_buttons, label: false, collection: TimeTableCombination.operations, label_method: lambda{|o| t("time_table_combinations.operations.#{o}")}, wrapper_html: { class: 'col-sm-8 col-xs-7' }    = f.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'tt_combination_form' diff --git a/app/views/time_tables/_form.html.slim b/app/views/time_tables/_form.html.slim index d4e1d838e..d06fdf444 100644 --- a/app/views/time_tables/_form.html.slim +++ b/app/views/time_tables/_form.html.slim @@ -5,7 +5,7 @@        = form.input :comment, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.time_table.comment")}        - if @time_table.new_record? && !@time_table.created_from -        = form.input :calendar_id, as: :select, collection: current_organisation.calendars +        = form.input :calendar_id, as: :select, input_html: { class: 'tt_target', style: "width: 100%", data: { 'select2-ajax': 'true', 'select2ed-placeholder': 'Indiquez un modèle de calendrier...', term: 'name_cont', url: autocomplete_calendars_path}}        - if @time_table.created_from          = form.input :created_from, disabled: true, input_html: { value: @time_table.created_from.comment } | 
