From d962cfc4de09e28f77433386b98fedfdc258495e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 16 Feb 2015 02:51:17 +0100 Subject: SRA PdL files: raw field for organization (refs #2279) --- ishtar_pdl/static/pdl/JQueryCorporation.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ishtar_pdl/static/pdl/JQueryCorporation.js (limited to 'ishtar_pdl') diff --git a/ishtar_pdl/static/pdl/JQueryCorporation.js b/ishtar_pdl/static/pdl/JQueryCorporation.js new file mode 100644 index 000000000..e65001506 --- /dev/null +++ b/ishtar_pdl/static/pdl/JQueryCorporation.js @@ -0,0 +1,14 @@ +var current_status = 'corporation'; + +$(function() { + var $radios = $('input:radio[name=person_type]'); + if($radios.is(':checked') === false) { + $radios.filter('[value='+ current_status +']').prop('checked', true); + } + + $radios.change(function(){ + var loc = window.location; + window.location = loc.protocol + '//' + loc.host + loc.pathname + "?status=" + $('input:radio[name=person_type]:checked').val(); + }); + $("#corporation_div").show(); +}); -- cgit v1.2.3