From f5579aa14b77c5538fe6b28c9617757a3eb1ca97 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 29 Aug 2018 13:58:28 +0100 Subject: [PATCH] Add type param to support form --- app/controllers/support_controller.rb | 1 + app/views/support/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/support_controller.rb b/app/controllers/support_controller.rb index ac9afe5b8..fdb634758 100644 --- a/app/controllers/support_controller.rb +++ b/app/controllers/support_controller.rb @@ -26,6 +26,7 @@ class SupportController < ApplicationController def setup_context @dossier_id = dossier&.id + @type = params[:type] @tags = params[:tags] @options = Helpscout::FormAdapter::OPTIONS end diff --git a/app/views/support/index.html.haml b/app/views/support/index.html.haml index c3e2f6078..5b1a5a307 100644 --- a/app/views/support/index.html.haml +++ b/app/views/support/index.html.haml @@ -20,7 +20,7 @@ = label_tag :type do Votre problème %span.mandatory * - = select_tag :type, options_for_select(@options) + = select_tag :type, options_for_select(@options, @type) .contact-champ = label_tag :dossier_id, 'Numéro du dossier concerné'