diff options
| author | Zog | 2018-02-08 10:33:46 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2018-02-20 10:20:18 +0100 | 
| commit | 3dcea81c627c1c740630ce7306bac55256ce8037 (patch) | |
| tree | 1ff79bdb5f04aba4503b47c781aaa0146d1ac32a /app/views/referentials | |
| parent | 3809301116aec5466445b29637026804da3d6745 (diff) | |
| download | chouette-core-3dcea81c627c1c740630ce7306bac55256ce8037.tar.bz2 | |
Refs #5863 @6h; Remove workbench id from the querystring
Infer it when possible, and use a nested otherwise
Diffstat (limited to 'app/views/referentials')
| -rw-r--r-- | app/views/referentials/_form.html.slim | 4 | ||||
| -rw-r--r-- | app/views/referentials/select_compliance_control_set.html.slim | 2 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/app/views/referentials/_form.html.slim b/app/views/referentials/_form.html.slim index 9927f05bd..1e59ab566 100644 --- a/app/views/referentials/_form.html.slim +++ b/app/views/referentials/_form.html.slim @@ -1,4 +1,6 @@ -= simple_form_for @referential, html: {class: 'form-horizontal', id: 'referential_form'}, wrapper: :horizontal_form do |form| +- url = @referential.new_record? ? [@workbench, @referential] : [@referential] + += simple_form_for @referential, url: url, html: {class: 'form-horizontal', id: 'referential_form'}, wrapper: :horizontal_form do |form|    .row      .col-lg-12 diff --git a/app/views/referentials/select_compliance_control_set.html.slim b/app/views/referentials/select_compliance_control_set.html.slim index 87a888c0a..69c87aab2 100644 --- a/app/views/referentials/select_compliance_control_set.html.slim +++ b/app/views/referentials/select_compliance_control_set.html.slim @@ -2,7 +2,7 @@    .container-fluid      .row        .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1 -        = form_tag validate_referential_path(params[:referential_id]), {class: 'form-horizontal', id: 'select_compliance_control_set', wrapper: :horizontal_form} do +        = form_tag validate_referential_path(@referential), {class: 'form-horizontal', id: 'select_compliance_control_set', wrapper: :horizontal_form} do            .row              .col-lg-12                .form-group | 
