From e9c4ff41a76df1304d5fad36619696f46e719125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chai=CC=88b=20Martinez?= Date: Thu, 14 Feb 2019 12:11:28 +0100 Subject: [PATCH] Minor changes --- app/views/support/index.html.haml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/app/views/support/index.html.haml b/app/views/support/index.html.haml index 1f8bbbacb..a365aa29c 100644 --- a/app/views/support/index.html.haml +++ b/app/views/support/index.html.haml @@ -20,23 +20,10 @@ = label_tag :type do Votre problème %span.mandatory * - = select_tag :type, options_for_select(@options, params[:type]),include_blank:"Choisir un problème", onchange:"show()" + = select_tag :type, options_for_select(@options, params[:type]),include_blank:"Choisir un problème",onchange:"show()", required: true - #info_demarche.contact-champ.aidesupport.hide - Mon texte info_demarche - %br - %br - - #usager_perdu.contact-champ.aidesupport.hide - Mon texte usager_perdu - %br - %br - - #info_instruction.contact-champ.aidesupport.hide - Mon texte info_instruction - %br - %br + #aidesupport .contact-champ @@ -65,6 +52,7 @@ = button_tag 'Envoyer le message', type: :submit, class: 'button send primary' :javascript + function show(){ var e = document.getElementById ("type"); var choix = e.options [e.selectedIndex] .value; @@ -73,29 +61,26 @@ var div_usager_perdu_ = document.getElementById("usager_perdu"); var div_info_instruction = document.getElementById("info_instruction"); - - console.log(divid); switch (divid) { case 'info_demarche': console.log('info_demarche'); - document.getElementById("info_demarche").classList.add("show"); - + document.getElementById("aidesupport").innerHTML = "aaaaa"; break; case 'usager_perdu': console.log('usager_perdu'); - document.getElementById("usager_perdu").classList.add("show"); - + document.getElementById("aidesupport").innerHTML = "bbbbb"; break; case 'info_instruction': console.log('info_instruction'); - document.getElementById("info_instruction").classList.add("show"); + document.getElementById("aidesupport").innerHTML = "cccc"; break; default: console.log('defaut'); + document.getElementById("aidesupport").innerHTML = ""; }