This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Global styles*/ | |
#container{ | |
position: relative; | |
max-width: 1000px; | |
min-width: 320px; | |
margin-top: 100px; | |
margin-left: auto; | |
margin-right: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="candidate-check-usi-section"> | |
<div class="header-container"> | |
<h2 class="title highlight">Unique Student Identifier</h2> | |
</div> | |
<div class="candidate-flex-box candidate-check-usi-details-dropdown"> | |
<label for="candidate-usi-question-y">Do you have a Unique Student Identifier(USI)? | |
<spand class="required-field"></spand> | |
<input type="radio" id="candidate-usi-question-y" name="usi-question" value="yes" checked="checked" | |
onclick="slideDown('#enter-usi'); slideUpDivclass('#candidate-create-usi-option'); slideUp('#candidate-placeofbirth-section'); uncheck('#create-usi-checkbox'); slideUp('.dropdown-id'); slideUp('#formsofid');"/> | |
<label class="answer-label" for="3">Yes</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var candidatePersonalDetails = $('#candidate-personal-details-section'); | |
var candidateContactDetails = $('#candidate-contact-section'); | |
var candidateAddressDetails = $('#candidate-address-section'); | |
var requiredItems = $('.required'); | |
$(candidatePersonalDetails).data('required', {total: $(candidatePersonalDetails).find(requiredItems).length, filled: 0}); | |
$(candidatePersonalDetails).find(requiredItems).on('keyup click', function() { checkField($(this), $(candidatePersonalDetails)); }); | |
$(candidatePersonalDetails).on('keyup click', function() { checkSection($(candidatePersonalDetails), $(candidatePersonalDetails)); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkField(element, parent) | |
{ | |
if ($(element).attr("type") == "radio") { | |
if ($("input[name=" + $(element).attr("name") + "]:checked").length > 0) { | |
if (!$(element).parent().hasClass("filled")) { | |
if ($(parent).data("required").filled < ($(parent).data("required").total)) { | |
$(parent).data("required").filled++; | |
$(element).parent().addClass("filled"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(candidatePersonalDetails).find('.required').on('keyup click', function() { string gettype ( mixed $(this) checkField($(this), (candidatePersonalDetails)); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkField(element, parent) | |
{ | |
if ($(element).attr("type") == "radio") { | |
if ($("input[name=" + $(element).attr("name") + "]:checked").length > 0) { | |
if (!$(element).parent().hasClass("filled")) { | |
if ($(parent).data("required").filled < ($(parent).data("required").total)) { | |
$(parent).data("required").filled++; | |
$(element).parent().addClass("filled"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slideDown=function(id){ | |
$(id).slideDown('slow') | |
} | |
showItem=function (id) { | |
$(id).show() | |
} | |
hideItem=function (id) { | |
$(id).hide() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signaturePadParentClass = (document.getElementById('signature-pad')); | |
var signaturePadParentData = signaturePadParentClass.dataset.parent; | |
var signaturePadChildData = signaturePadParentClass.dataset.child; | |
var signaturePadConstructor = []; | |
signaturePadConstructor.push(signaturePadParentData , signaturePadChildData) | |
var signaturePadConstructor = new (signaturePadConstructor, { | |
backgroundColor: 'rgba(255, 255, 255, 0)', | |
penColor: 'rgb(0, 0, 0)' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var signaturePads = []; | |
var signaturePadContainer = document.getElementsByClassName('signature-container'); | |
var signaturePadParentClass = document.getElementsByClassName('signature-pad'); | |
console.log(signaturePadContainer) | |
console.log(signaturePadParentClass) | |
var signaturePadParentIndex = signaturePadContainer.signaturePadParentClass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['Student'].map(function (id) { | |
SignaturePad["SignaturePad" + id] = new SignaturePad | |
(document.getElementById('signature-pad-'+id)) | |
}); |