The repo for Purrform's main BigCommerce store.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: improve visibility logic for account creation fields based on us… (#8)

authored by

Rogerio Romao and committed by
GitHub
b97952d7 f86aa6ff

+12 -7
+12 -7
templates/pages/auth/create-account.html
··· 34 34 35 35 <script> 36 36 jQuery(document).ready(function () { 37 + $("#FormField_27").css("display", "none"); // hide store name 38 + $("#FormField_26").css("display", "none"); // hide tica number 39 + $("#FormField_35").css("display", "none"); // hide loyalty points selector 37 40 $("#FormField_28 input").ready(function () { 41 + document.getElementById('FormField[1][28]_0').setAttribute('checked', true); 38 42 $("input").change(function () { 39 - if ($(this).val() == "personal") { 43 + if ($(this).val() === "personal") { 40 44 $("#FormField_27").css("display", "none"); 41 - $("#FormField_27 input").prop('disabled', true); 42 45 $("#FormField_26").css("display", "none"); 43 - $("#FormField_26 input").prop('disabled', true); 44 - } else { 46 + } else if ($(this).val() === "breeder") { 47 + $("#FormField_27").css("display", "none"); 48 + document.querySelector('#FormField_28').insertAdjacentElement('afterend', document.querySelector('#FormField_26')); 49 + $("#FormField_26").css("display", "block"); 50 + } else if ($(this).val() === "trade") { 51 + document.querySelector('#FormField_28').insertAdjacentElement('afterend', document.querySelector('#FormField_27')); 45 52 $("#FormField_27").css("display", "block"); 46 - $("#FormField_27 input").prop('disabled', false); 47 - $("#FormField_26").css("display", "block"); 48 - $("#FormField_26 input").prop('disabled', false); 53 + $("#FormField_26").css("display", "none"); 49 54 } 50 55 }); 51 56 });