1const useSecurityQuestion = () => { 2 let securityQuestions = []; 3 4 const startLoading = () => { 5 $('#selSecurityQuestion').prop("disabled", true); 6 } 7 const finishLoading = () => { 8 $('#selSecurityQuestion').prop("disabled", false); 9 } 10 11 const updateSecurityQuestionDropdown = () => { 12 const $dropdown = $('#selSecurityQuestion'); 13 $dropdown.empty(); 14 for (const index in securityQuestions) 15 { 16 const option = securityQuestions[index]; 17 $dropdown.append(`<option value="${option.Value}">${option.Text}</option>`); 18 } 19 } 20 const loadSecurityQuestion = () => { 21 if (securityQuestions && securityQuestions.length > 0) { 22 return; 23 } 24 25 startLoading(); 26 $.ajax({ 27 url: '/api/registerPage/GetSecurityQuestion', 28 type: 'GET', 29 success: function (result) { 30 if (result) { 31 securityQuestions = result; 32 updateSecurityQuestionDropdown(); 33 } 34 finishLoading(); 35 } 36 }); 37 } 38 39 return { 40 loadSecurityQuestion 41 } 42};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.