From 04d0732a3cef52a3ea996df0f0c07ddc8c3c12d9 Mon Sep 17 00:00:00 2001 From: labcode-de Date: Tue, 20 Mar 2018 21:18:03 +0100 Subject: [PATCH] Links zu Kontaktformular --- assets/js/kontakt.js | 21 ++++++++++++++++++++- kontakt.html | 5 +++-- mitmachen_unterstuetzen.html | 1 + 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/assets/js/kontakt.js b/assets/js/kontakt.js index 71f76e0..f18bb3a 100644 --- a/assets/js/kontakt.js +++ b/assets/js/kontakt.js @@ -1,3 +1,22 @@ +function getParameterByName(name, url) { + if (!url) url = window.location.href; + name = name.replace(/[\[\]]/g, "\\$&"); + var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), + results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, " ")); +} $(function () { - $('select').material_select(); + const param_rcp = getParameterByName('rcp') + if(param_rcp !== "") { + const rcp_option = $('#recipient>option[value=' + param_rcp + ']'); + if(rcp_option.length === 1) { + rcp_option.attr('selected', true); + $('#recipient_option_choose').removeAttr('selected'); + $('select').material_select(); + } + } else { + $('select').material_select(); + } }) \ No newline at end of file diff --git a/kontakt.html b/kontakt.html index 020fc20..7afeed0 100644 --- a/kontakt.html +++ b/kontakt.html @@ -13,8 +13,9 @@ permalink: '/kontakt/'
- + + diff --git a/mitmachen_unterstuetzen.html b/mitmachen_unterstuetzen.html index ef9b0fb..88bd745 100644 --- a/mitmachen_unterstuetzen.html +++ b/mitmachen_unterstuetzen.html @@ -27,6 +27,7 @@ permalink: /mitmachen_unterstuetzen/
Antrag für ein Fördermitglied

+

Wenn du noch Fragen hast schreib uns. Kontaktformular

Spenden