CINXE.COM

Rubric :: Form Submission

<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui"> <meta name="description" content="Rubric Club Portal"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta property="og:image" content="https://admin.hellorubric.com/assets/uploadedimgs/a8b08bb63f834744e0286970fa99db64.png"> <meta name="author" content="Rubric"> <title>Rubric :: Form Submission</title> <link rel="apple-touch-icon" href="https://admin.hellorubric.com/assets/uploadedimgs/ec67d74a92072b9d12916c84e1ef8012.png"> <link rel="shortcut icon" type="image/x-icon" href="https://admin.hellorubric.com/assets/uploadedimgs/ec67d74a92072b9d12916c84e1ef8012.png"> <!--Core CSS --> <link rel="stylesheet" href="https://cachedresources.hellorubric.com/joint_assets/css/app.css" /> <link rel="stylesheet" href="https://cachedresources.hellorubric.com/joint_assets/css/main.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/rangeslider.js/2.3.3/rangeslider.css" /> <!-- Fonts --> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" rel="stylesheet" /> <link href="https://resources.hellorubric.com/app-assets/colorPick.css" rel="stylesheet" /> <link href="https://resources.hellorubric.com/assets/css/star-rating.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" /> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" /> </head> <style> .table th, .table td { padding: 0.75rem !important; color: #000000 !important; } .table th { max-width: 200px; overflow-wrap: break-word; word-break: break-word; white-space: pre; /* CSS 2.0 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3.0 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: -moz-pre-wrap; /* Mozilla */ white-space: -hp-pre-wrap; /* HP Printers */ word-wrap: break-word; /* IE 5+ */ } .table textarea { max-width: 400px; } body { color: #485fc7; font-size: 1em; font-weight: 400; line-height: 1.5 } .field>label { font-family: "Roboto", sans-serif; font-size: .9rem; color: #202022 !important; } .radio { color: #202022; } .select::after { opacity: 0; } .form-layout { max-width: 1028px; } .field { font-family: "Roboto", sans-serif; font-size: .9rem; color: #283252 !important; } .view-wrapper .is-stuck { top: 0 !important; } .range { display: flex; } .range__slider { width: 45%; margin-right: 20px; } .range__value { text-align: center; border-left: #e6e4e4 1px solid; } .form-group { display: flex; flex-direction: column; justify-content: center; } .range__slider label { margin-bottom: 10px; } .range__slider [type="range"] { width: 100%; -webkit-appearance: none; height: 13px; border-radius: 6px; background: #f1f1f1; outline: none; padding: 0; margin: 0; } /* custom thumb */ .range__slider [type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 25px; height: 25px; border-radius: 50%; background: #7a00ff; border: #f9ca24 5px solid; cursor: pointer; -webkit-transition: background .15s ease-in-out; transition: background .15s ease-in-out; } .range__slider [type="range"]::-webkit-slider-thumb:hover { background: #f0932b; } .range__slider [type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #f0932b; border: #f9ca24 5px solid; cursor: pointer; -webkit-transition: background .15s ease-in-out; transition: background .15s ease-in-out; } .range__slider [type="range"]::-moz-range-thumb:hover { background: #f9ca24; } /* remove border */ input::-moz-focus-inner, input::-moz-focus-outer { border: 0; } .tippy-content { color: #FFF; } .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs { width: 280px; border-radius: 8px; padding-top: 16px; padding-right: 16px; padding-left: 16px; } .bootstrap-datetimepicker-widget.dropdown-menu { width: 150px; color: #DFC0CD; background: #fcfcfc; } </style> <body> <div id="huro-app" class="app-wrapper"> <div class="app-overlay"></div> <!--Pageloader--> <!-- Pageloader --> <div class="pageloader"></div> <div class="infraloader is-active"></div> <div id="menuinserted" class="is-hidden"> </div> <!-- Content Wrapper Test--> <div class="view-wrapper"> <div class="is-hidden-desktop" style="height:20px"> </div> <progress id="wizard-progress" class="progress is-smaller is-primary wizard-progress" value="33" max="100"></progress> <div class="page-content-wrapper"> <div class="page-content is-relative"> <div class="page-title has-text-centered is-hidden-mobile" style="height:42px"> </div> <div class="is-hidden-desktop" style="height:20px"> </div> <div class="page-content-inner " style="margin-top:20px;"> <center> <img class="brand-logo" alt="Card image" id="unilogo" src="https://resources.hellorubric.com/images/toooot3-768x192.png" style="max-height: 70px;"> </center> <div class="formref d-none"> <center> <p>Form reference #<span id='formreference'></span></p> </center> </div> <div class="message is-danger is-hidden" id="union-preview-message"> <div class="message-body" style="text-align: center;">This is a union preview form. If you are a club, please login to your clubs portal and you can find this form in your forms module. If you are a union, you can share this link to the club: <br> <a href=""></a> </div> </div> <br> <div id="resetholdertwo" class="d-none s-card center" style="text-align: center"> <h1 style="font-weight: bold;margin-top:20px;"><span id="textHeader">Email Verification</span> </h1> <h6 style=" margin-top: 20px;">An <span id="smsoremail">Email</span> was just sent to your society inbox with a verification code.<br> Alternatively, you can access your code by logging into your Rubric society portal <a href="/?unicode=true" target="_blank"> here </a> </h6> <input type="text" class="input form-control form-control-lg widthbiggersmall" id="verification" placeholder="Insert Verification Code" required="" autocomplete="off" style="margin: 0 auto;width: 40%;margin-top:20px"> <br> <div class="message is-danger d-none widthbiggersmall" style="width: 40%;margin: 0px auto;margin-top:20px;" role="alert" id="errormessageresettwo"> </div> <button id="resettwo" class="button h-button is-danger widthbiggersmall" style="border-color: #f0337f !important;background-color: #f0337f !important;color: #FFFFFF;width: 40%;margin: 0px auto;margin-top:20px;">Submit </button> <br> <button class="cancelreset button h-button is-primary is-outlined widthbiggersmall" style="width: 40%;margin: 0px auto;margin-top:10px;">Cancel </button> <br> <p class="d-none" style="margin-top:20px;">Not getting the code? <strong><button id="verifyemailcode" style="margin-top:20px;background: transparent;border: none;color: #319c9f; outline: none;padding-left: 0px;padding-right: 0px;">Click here</button></strong> to get the code via email instead</p> <br> </div> <div class="s-card d-none" id="successholder" style="text-align: center; border-radius: 10px; overflow: hidden;"> <br> <center> <h1 class="title is-4 is-narrow">Thanks for your submission</h1> <br> <h2 class="card-title">Your form receipt ID is <span id="uuid"><strong></strong></span> </h2> <img src="https://admin.hellorubric.com/assets/img/success-tick-dribbble.gif" width="350" height="270"> <h5> For any updates, please check your email inbox regularly, if applicable </h5> <br> </center> </div> <div class="form-layout" id="formholder"> <div class="form-outer"> <div id="templatequestion-bool no-break" class="d-none"> <br> <label id="questionlabel"></label> <div style="height:5px"> </div> <div class="form-group" style="margin-left: 30px;"> <input type="radio" value="true"> &nbsp;Yes <br> <div style="height:10px"> </div> <input type="radio" value="false"> &nbsp;No <br> </div> <br> </div> <div class="form-header"> <div class="form-header-inner"> <div class="left"> <br> <h2 class="title is-5 is-narrow is-bolder" id="formtitle">Loading form details</h2> </div> <div class="right"> <div class="buttons print d-none"> <button id="print" class="button h-button is-primary is-raised">Print PDF</button> <button id="export" class="button h-button is-primary is-raised">Download CSV</button> </div> </div> </div> <br> <p id="formdescription"></p> </div> <div class="form-body" id="stagesrow"> <div class="printing"> </div> <!--Fieldset--> <div class="columns is-multiline"> <div class="column is-12"> <!-- Short Text question --> <div class="form-group field d-none no-break q-template" id="shorttext"> <label id="labelTitle" style="color:#202022;">Email Address</label> <br> <input id="smalltextinput" type="text" class="togoover input" placeholder=""> <br> <br> </div> <!-- Big Text question--> <div class="form-group field d-none no-break q-template" id="bigtext"> <label id="labelTitle">Special Instructions</label> <div class="control"> <textarea id="basicTextarea" class="textarea togoover" rows="4"></textarea> </div> <br> </div> <!-- Upload file question --> <div class="form-group field d-none no-break q-template" id="uploadtext"> <label for="basicInputFile" id="labelTitle"></label> <fieldset class="form-group"> <a id="uploadedfilelink" target="_blank" class="d-none">Your uploaded file</a><br /> <input type="file" max-size="2000" class="form-control-file togoover" accept=".png, .jpg, .pdf, .doc, .docx, .xlsx, .csv, .xls" id="basicInputFile"> </fieldset> <br> <hr> </div> <!-- Radio button question --> <div class="form-group field d-none no-break q-template" id="radiotext"> <label id="labelTitle"></label> <div class="control togoover radiobuttons" id="radiochoices"> </div> </div> <!-- Signature Question --> <div class="form-group d-none no-break signaturebox q-template" id="signaturefield"> <label for="basicTextarea" id="labelTitle"></label> <br> <canvas id="signature" width="400" style="border: 1px solid black;touch-action: none;" height="100"></canvas> <div class="signature-pad--body" id="signinput"> </div> <div class="signature-pad--footer"> <div class="description">SIGN ABOVE </div> <br> <div class="signature-pad--actions"> <div> <button id="clearsig" type="button" class="button clear" data-action="clear">Clear</button> </div> <br> <br> </div> </div> </div> <!-- Checkbox question --> <div class="form-group field d-none togoover checkboxes no-break q-template" id="checkbox"> <label id="labelTitle"></label> <div class="control" id="checkboxchoices"> </div> </div> <!-- Link Question --> <div class="form-group field no-break d-none q-template" id="buttonholder"> <label for="basicCheckBox" id="labelTitle"><strong></strong></label> <br /> <br /> <button class="button h-button is-primary is-outlined togoover linkbtn" style="margin-bottom:20px;"> <span id="memlinktext">Click Here</span> <i id="copyicon" class="ft-arrow-right"></i> </button> </div> <!-- Star Question --> <div class="form-group field no-break d-none q-template" id="rating"> <label for="basicCheckBox" id="labelTitle"><strong></strong></label> <br /> <br /> <select class="star-rating" ratings="1"> <option value="">Select a rating</option> <option value="5">Excellent</option> <option value="4">Very Good</option> <option value="3">Average</option> <option value="2">Poor</option> <option value="1">Terrible</option> </select> </div> <!-- Star Question --> <div class="form-group field no-break d-none q-template" id="affiliation_year"> <label for="year-select" id="labelTitle"><strong></strong></label> <select class="year-select" style="width: max-content;"> </select> </div> <!-- Date time picker --> <div class="form-group field d-none no-break q-template" id="datetimepickerInput"> <label id="labelTitle"></label> <div class="control"> <input type="text" class="form-control datetimepickerinput" data-td-target="#datetimepicker1"> <span class="input-group-text" data-td-target="#datetimepicker1" data-td-toggle="datetimepicker"> <i class="fas fa-calendar"></i> </span> </div> <br> </div> <!-- Input Slider Question --> <div class="form-group field no-break d-none q-template grant" id="sliderselect"> <label for="basicCheckBox" id="labelTitle"><strong></strong></label> <br> <div class="select"> <select name="options" id="optionlist2"> </select> </div> <br> <br> <div class="container"> <div class="range"> <div class="form-group range__slider"> <input id="slidertext" type="text" class="dontsubmit input" placeholder="Type an amount" style="height:30px;"> <div class="is-divider" data-content="OR"></div> <input type="range" step="0.01"> </div> <!--/form-group--> <div class="form-group range__value"> <label id="balancegranttitle" style="color:#a2a5b9 !important">Grant Claim Amount</label> <span style="font-size: 2rem;font-weight: 600;color: #3c3b3b;" id="balancegrant"></span> </div> <!--/form-group--> </div> </div> <!--/container--> </div> <!-- Select question --> <div class="form-group field selectquestion d-none no-break q-template" id="select"> <label for="basicSelect" id="labelTitle"></label> <br> <div class="select"> <select name="options" id="optionlist" class="dontsubmit"></select> </div> </div> <!-- TABLE QUESTION --> <div class="tablequestion form-group field d-none no-break q-template" id="tablequestion" style="overflow-x: auto; white-space: nowrap;"> <label for="tblAppendGrid" id="labelTitle"></label> <br> <table id="tblAppendGrid" class="togoover"></table> <hr /> </div> <!-- TABLE UPLOAD QUESTION --> <div class="tableuploadquestion form-group field d-none no-break q-template" id="tableuploadquestion" style="overflow-x: auto; white-space: nowrap;"> <label for="tblAppendGrid" id="labelTitle"></label> <br> <table id="tblAppendGrid" class="togoover"></table> <hr /> </div> <!-- TABLE DISPLAY RESULTS --> <div class="tableresponses form-group field d-none no-break q-template" id="tableresponses" style="overflow-x: auto; white-space: nowrap;"> <label for="tblAppendGrid" id="labelTitle"></label> <br> <table id="tblAppendGrid" class="togoover"></table> <hr /> </div> <!-- APPROVED AMOUNT RESULTS --> <div class="approved-amount form-group field d-none no-break q-template" id="approved-amount" style="overflow-x: auto; white-space: nowrap;"> <br> <br> <div class="form-group range__value" style="border-left:0px;"> <label id="balancegranttitle" style="color:#a2a5b9 !important">Union Approved Amount</label> <span style="font-size: 2rem;font-weight: 600;color: #3c3b3b;" id="approved-amount-value"></span> </div> </div> </div> </div> </div> <!-- STANDARD ERROR MESSAGE////////////////////////////////////////////////////////////////////////////--> <div class="column is-12"> <div class="message is-danger d-none q-template" id="errormessage"> <div class="message-body" id="errortext"> Better check yourself, you're not looking too good. </div> </div> </div> <!-- SUBMIT BUTTON////////////////////////////////////////////////////////////////////////////--> <div class="columns is-multiline is-mobile"> <div class="column is-5"> </div> <div class="column is-2 text-center" id="submitbtn"> <button id="submitforms" class="button h-button is-primary q-template" style="margin-bottom:20px; margin-left:10px;"> <span id="memlinktext">Submit</span> </button> </div> <div class="column is-5"> </div> </div> </div> </div> <br> <br> <center> <p>Powered by </p> <a href="http://hellorubric.com/"> <img class="brand-logo" alt="Rubric logo" src="https://portal.hellorubric.com/assets/revolvapp/uploaded/fdabba3ae8612070e82891f236021963.png" style=" max-height: 50px;"> </center> </a> </div> </div> </div> </div> </div> <!-- Concatenated plugins --> <script src="https://cachedresources.hellorubric.com/joint_assets/js/app.js"></script> <script src="menu.js?bpc=true"></script> <!--MAKE YOUR OWN JS FILE FOR SIDE MENU--> <!--script src="https://portal.hellorubric.com/membershipmenu.js"></script--> <!-- Huro js --> <script src="https://cachedresources.hellorubric.com/joint_assets/js/functions.js"></script> <script src="https://cachedresources.hellorubric.com/joint_assets/js/main.js"></script> <script src="https://cachedresources.hellorubric.com/joint_assets/js/components.js"></script> <script src="https://cachedresources.hellorubric.com/joint_assets/js/popover.js"></script> <script src="https://cachedresources.hellorubric.com/joint_assets/js/widgets.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/2.5.4/tippy.standalone.js"></script> <!-- Additional Features --> <script src="https://cachedresources.hellorubric.com/joint_assets/js/touch.js"></script> <script src="https://cachedresources.hellorubric.com/joint_assets/js/syntax.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.5/moment-timezone-with-data.min.js"> </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js"> </script> <script src="https://resources.hellorubric.com/app-assets/colorPick.js"></script> <script src="https://resources.hellorubric.com/assets/js/star-rating.js" async></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jStorage/0.4.12/jstorage.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery.appendgrid@2.0.8/dist/AppendGrid.min.js"></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/autosize.js/3.0.15/autosize.min.js'></script> <script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/rangeslider.js/2.3.3/rangeslider.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/js-sha1/0.6.0/sha1.min.js" type="text/javascript"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/highlight.run"></script> <script type="text/javascript" src="https://resources.hellorubric.com/shared_resources/custom_merged.js?bpc=true"></script> <!-- Popperjs --> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha256-BRqBN7dYgABqtY9Hd4ynE+1slnEw+roEPFzQ7TRRfcg=" crossorigin="anonymous"></script> <!-- Tempus Dominus JavaScript --> <script src="https://cdn.jsdelivr.net/npm/@eonasdan/tempus-dominus@6.7.16/dist/js/tempus-dominus.min.js" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"> </script> <style> .no-break { page-break-before: always; } .page-item.disabled .page-link { border: 1px solid #ddd !important; } </style> <script> var submission_redirect_link = ""; var globalFormType = null; $.jStorage.set("memform", true); $.jStorage.setTTL("memform", 86400000); function shownewsociety() { if (disableopennew == false) { $("#societies").select2("close"); $("#societies").prev().prev().addClass("d-none"); $("#societies").next().addClass("d-none"); $("#socname").val(""); $("#socemail").val(""); $(".newsoc").removeClass("d-none"); } } $(document).ready(function() { var loadingdiv = "#submitforms"; var verificationcode = ""; var emailverificationrequired = false; $(".cancelreset").click(function() { $("#formholder").removeClass("d-none"); $("#resetholdertwo").addClass("d-none"); }); $("#resettwo").click(function() { console.log("this works") emailverificationrequired = false; verificationcode = $("#verification").val(); loadingdiv = "#verification"; $("#formholder").removeClass("d-none"); $("#resetholdertwo").addClass("d-none"); submitForm(true); }); function submitForm(verificationcoderequired) { var toSubmit = new Object; toSubmit["formID"] = formid; if (verificationcoderequired) { toSubmit.verificationcode = verificationcode; } if (getUrlParameter("ed")) { toSubmit["ed"] = true; } if ($(".newsoc").length) { toSubmit["societyemail"] = $("#socemail").val(); toSubmit["societyname"] = $("#socname").val(); if ($("#socusername").length) { toSubmit["societyusername"] = $("#socusername").val(); toSubmit["societypassword"] = sha1($("#socpassword").val()); } } if ($("#useremail").length) { toSubmit["useremail"] = $("#useremail").val(); //toSubmit["usermobile"] = $("#usermobile").val(); } var answerArray = []; $(".linkbtn").each(function() { if ($(this).hasClass("dontsubmit") == false && $(this).is("[questionId]")) { var answerObject = new Object; answerObject[$(this).attr("questionId")] = $(this).hasClass( "clicked") + ""; if ($(this).prop("disabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } answerArray.push(answerObject); } }); $(".form-control-file").each(function() { if ($(this).hasClass("uploaded") && $(this).hasClass( "dontsubmit") == false && $(this).is("[questionId]")) { var answerObject = new Object; answerObject[$(this).attr("questionId")] = $(this).attr( "uploaded"); if ($(this).prop("disabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } answerArray.push(answerObject); } }); $(":text,textarea,:checked,:selected,input").each(function() { if (($(this).parent().is("select") && !($(this).parent().attr("ratings")) && !($(this) .attr("grantappuuid"))) || ( $(this).hasClass("dontsubmit") == false && $(this).is("[questionId]"))) { var answerObject = new Object; if ($(this).prop("disabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false && $(this).parent().is("select") == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } if ($(this).is(':visible') == false) { answerObject[$(this).attr("questionId")] = $(this).text(); answerArray.push(answerObject); } else if ($(this).is(':visible') && ($(this).is(':text') || $(this).is( 'textarea'))) { answerObject[$(this).attr("questionId")] = $(this).val(); answerArray.push(answerObject); } else if ($(this).is(':visible') && ($(this).is(':checked') || $(this).is( ':selected'))) { answerObject[$(this).attr("questionId")] = $(this).parent().text(); answerArray.push(answerObject); } } }); $("table").each(function() { if ($(this).is("[questionId]")) { var answerObject = new Object; var gidobject = listoftables[$(this).attr("id")]; var tblAppendGrid = gidobject.getAllValue(false); answerObject[$(this).attr("questionId")] = tblAppendGrid; if ($(this)[0].hasAttribute("isdisabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } answerArray.push(answerObject); } }); $(".signatureholder").each(function() { if ($(this).is("[questionId]")) { var answerObject = new Object; answerObject[$(this).attr("questionId")] = window["sig" + $(this).attr( "questionId")].toDataURL(); if ($(this).prop("disabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } answerArray.push(answerObject); } }); $(".grant").each(function() { if ($(this).is("[questionId]")) { var answerObject = new Object; var grantapp = new Object; grantapp["grantamount"] = $(this).find('[type="range"]').val(); grantapp["grantuuid"] = $(this).find("select").find(":selected").attr( "grantappuuid"); answerObject[$(this).attr("questionId")] = grantapp; if ($(this).prop("disabled")) { answerObject.ignore = true; } else if ($(this).is(':visible') == false) { answerObject.ignore = true; } else { answerObject.ignore = false; } answerArray.push(answerObject); } }); toSubmit["uuid"] = uuid; toSubmit["answers"] = answerArray; if (getUrlParameter("toemail")) { toSubmit["useremail"] = getUrlParameter("toemail"); } console.log(toSubmit); $("#errormessage").addClass("d-none"); makeCall("postUnionForm", toSubmit, 25000, false, true, function(dataparsed) { $("html, body").animate({ scrollTop: $(document).height() }, 500); if (dataparsed.hasOwnProperty('success') && dataparsed[ "success"] == false) { $("#errormessage").removeClass("d-none"); $("#errortext").text(dataparsed["usererror"]); } else if (dataparsed.hasOwnProperty('success') && dataparsed[ "success"] == true) { $("#formholder").addClass("d-none"); if (dataparsed.hasOwnProperty('sessionid')) { $.jStorage.set("sessionid", dataparsed["sessionid"]); } // Route the user to the form membership page if the form type is newclub/affiliation or newclub2/reaffiliation if (globalFormType && (globalFormType == "newclub" || globalFormType == "affiliation" || globalFormType == "newclub2" || globalFormType == "reaffiliation")) { // If they have a paid membership, route them to the website builder if (dataparsed.hasOwnProperty('hasPaidMembership') && dataparsed .hasPaidMembership == true) { location.href = "https://portal.hellorubric.com/websitebuilder?formsubmitted=true"; } else if (dataparsed.hasOwnProperty('latestMembershipTypeID')) { location.href = "/form_membership?mid=" + dataparsed .latestMembershipTypeID; } else { location.href = "/form_membership"; } console.log("globalFormType", globalFormType); } else if (submission_redirect_link == "") { cjs_showConfetti(); $("#form-section").addClass("d-none"); $("#successholder").removeClass("d-none"); $("#successholder").find("#uuid").text(uuid); } else { window.location.replace(submission_redirect_link); } } } ); } var formid = getUrlParameter("fid").replace(/\D/g, "");; var uuid = uuidv4(); if (getUrlParameter("prefill_uid")) { uuid = getUrlParameter("prefill_uid"); } if ($.jStorage.get('sessionid') == null || getUrlParameter("uniacc")) { $("#wizard-progress").addClass("is-hidden"); } console.log(formid); var jsontosend = new Object; if (getUrlParameter("uuid")) { $("#wizard-progress").addClass("is-hidden"); jsontosend["uuid"] = getUrlParameter("uuid"); uuid = getUrlParameter("uuid"); $(".print").removeClass("d-none"); $(".formref").removeClass("d-none"); } if (getUrlParameter("type") == "claim") { getItem("sessionid"); } if ($.jStorage.get('sessionid')) { jsontosend["sessionid"] = $.jStorage.get('sessionid'); } if (getUrlParameter("uniacc")) { jsontosend["uniacc"] = getUrlParameter("uniacc"); $("#submitbtn").addClass("is-hidden"); $("#union-preview-message a").attr("href", "https://portal.hellorubric.com/form?fid=" + getUrlParameter( "fid")). text("https://portal.hellorubric.com/form?fid=" + getUrlParameter("fid")).removeClass("is-hidden"); $("#union-preview-message").removeClass("is-hidden"); } jsontosend["formID"] = formid; var listoftables = new Object; makeCall("getUnionForm", jsontosend, 25000, false, true, function(dataparsed) { $("#formcontentloading").addClass("d-none"); $("#formcontent").removeClass("d-none"); globalFormType = dataparsed["formtype"]; if (dataparsed.formMigrated && dataparsed.formMigrated == true && getUrlParameter( 'fid')) { if (getUrlParameter('uniacc')) { window.location.href = "/create_form?preview=true&fid=" + getUrlParameter('fid'); return; } let redirectString = "/submit_form?fid=" + getUrlParameter('fid'); if (getUrlParameter('uuid')) { redirectString += "&uuid=" + getUrlParameter('uuid'); } window.location.href = redirectString; return; } if (globalFormType && (globalFormType == "newclub" || globalFormType == "affiliation" || globalFormType == "newclub2" || globalFormType == "reaffiliation")) { } else { $(".wizard-progress").addClass("is-hidden") } if (dataparsed.hasOwnProperty('refnumber')) { $("#formreference").text(dataparsed["refnumber"]); } if (dataparsed.hasOwnProperty("disableexport")) { $(".print").addClass("d-none"); } else { $(".print").removeClass("d-none"); } if (dataparsed.hasOwnProperty('submission_redirect_link')) { submission_redirect_link = dataparsed["submission_redirect_link"]; //window.location.replace(submission_redirect_link); } if (getUrlParameter("star") && getUrlParameter("toemail")) { } else { $("#unilogo").attr("src", dataparsed["unionlogo"]); } $("#unilogo").removeClass("d-none"); if (dataparsed.hasOwnProperty('requires_sessionid')) { if (getUrlParameter("uniacc")) { } else { getItem("sessionid"); $("#menuinserted").removeClass("is-hidden"); } } //Receive JSON RESPONSE FROM SERVER WITH SUCCESS if (dataparsed.hasOwnProperty('success') && dataparsed["success"] == true) { if (dataparsed.hasOwnProperty('formtype') && (dataparsed["formtype"] === "newclub3" || dataparsed["formtype"] === "manual_affiliation" || dataparsed["formtype"] === "manualgrantapp" || dataparsed["formtype"] === "manual_grant_application")) { $("#submitbtn").remove(); } ucjs_createForm(dataparsed); $("#export").click(function() { if (getUrlParameter("uuid") == "eca225bf-afa3-4820-9b00-5500dba79c8c") { download_dev(csv, getUrlParameter("uuid") + ".csv", "'text/csv;encoding:utf-8'"); } else { download(csv, getUrlParameter("uuid") + ".csv", "'text/csv;encoding:utf-8'"); } }); $("#print").click(function() { //$("#submitforms").addClass("d-none"); for (z = 0; z < csvobj.length; z++) { var csvitem = csvobj[z]; var item = "<form-group><b>" + csvitem["formquestiontitle"] + "</b><br/>"; if ((csvitem["questiontype"].includes("{") || csvitem["questiontype"] .includes("[")) && (csvitem["questiontype"].includes("table") || csvitem[ "questiontype"].includes("multicheck"))) { const jsonarrayobj = JSON.parse(csvitem.prefill); for (zz = 0; zz < jsonarrayobj.length; zz++) { var objectlooking = jsonarrayobj[zz]; var keys = Object.keys(objectlooking); for (zzk = 0; zzk < keys.length; zzk++) { var addendum = ", "; if (zzk == keys.length - 1) { addendum = ""; } var keyname = keys[zzk]; if (keyname == "title") { keyname = "Selection"; } item += "<i style='color:purple'>" + keyname + "</i>: " + objectlooking[keys[zzk]] + addendum; } item += "<br/>" } item += "<br/><br/></form-group>"; } else if (csvitem["questiontype"].includes("slider")) { const jsonarrayobj = JSON.parse(csvitem.prefill); var keys = Object.keys(jsonarrayobj); for (zzk = 0; zzk < keys.length; zzk++) { var addendum = ""; if (zzk == keys.length - 1) { addendum = ""; } var keyname = keys[zzk]; if (keyname == "grantamount") { keyname = "Amount"; } else if (keyname == "grantuuid") { keyname = "Original Grant Application ID"; } item += "<i style='color:purple'>" + keyname + "</i>: " + jsonarrayobj[keys[zzk]] + addendum; item += "<br/>" } item += "<br/><br/></form-group>"; } else { var prefillval = "N/A"; if (csvitem.hasOwnProperty("prefill")) { prefillval = csvitem["prefill"]; } item += prefillval + "<br/><br/></form-group>"; } $(".printing").append($(item)); } console.log($(".printing").html()); w = window.open(); w.focus(); w.document.write($(".printing").html()); w.print(); $(".printing").empty(); // w.close(); }); $('.tabletomake').each(function(i, obj) { console.log("i", i) console.log("pbj", obj) var multiquestions = JSON.parse(hex2String($(this).attr("multiquestions"))); var type = "textarea"; if ($(this)[0].hasAttribute("isdisabled")) { type = "readonly"; } var columns = []; for (z = 0; z < multiquestions.length; z++) { var columnobject = new Object; columnobject.name = multiquestions[z].title; columnobject.display = multiquestions[z].title; columnobject.type = type; columnobject.displayCss = { "color": "#ffffff" }; columns.push(columnobject); } var initsettings = { uiFramework: "bootstrap4", iconFramework: "fontawesome5", element: obj, columns: columns, hideRowNumColumn: true, initRows: 2, sizing: "small", hideButtons: { insert: true, moveUp: true, moveDown: true } }; if ($(this)[0].hasAttribute("prefill")) { var stringtoparse = hex2String($(this).attr("prefill")).replace(/\\/g, ""); console.log("stringtoparse:", stringtoparse); stringtoparse = stringtoparse.substring(1, stringtoparse.length - 1); var prefill = new Object; if (isJSON(stringtoparse)) { prefill = JSON.parse(stringtoparse); } else { columns = []; const myArray = stringtoparse.split(", "); for (q = 0; q < myArray.length; q++) { var insideard = myArray[q].split(": "); var columnobject = new Object; columnobject.name = insideard[0]; columnobject.display = insideard[0]; columnobject.type = type; columnobject.displayCss = { "color": "#ffffff" }; columns.push(columnobject); prefill[insideard[0]] = insideard[1]; } initsettings.columns = columns; } initsettings.initData = prefill; if ($(this)[0].hasAttribute("isdisabled")) { initsettings.hideButtons = { insert: true, moveUp: true, moveDown: true, remove: true, append: true, removeLast: true }; } } var myAppendGrid = new AppendGrid(initsettings); listoftables[$(this).attr("id")] = myAppendGrid; }); $('.tableuploadtomake').each(function(i, obj) { var multiquestions = JSON.parse(hex2String($(this).attr("multiquestions"))); var type = "text"; if ($(this)[0].hasAttribute("isdisabled")) { type = "readonly"; } var columns = []; for (z = 0; z < multiquestions.length; z++) { var columnobject = new Object; columnobject.name = multiquestions[z].title; columnobject.display = multiquestions[z].title; columnobject.type = type; if (multiquestions[z].title.toLowerCase().indexOf('upload') != -1) { columnobject.type = "custom"; columnobject.customBuilder = function(parent, idPrefix, name, uniqueIndex) { // Create the content of custom type var inputGroup = document.createElement("div"); inputGroup.classList.add("input-group"); parent.appendChild(inputGroup); var inputControl = document.createElement("input"); inputControl.id = idPrefix + "_" + uniqueIndex; inputControl.name = inputControl.id; inputControl.type = "file"; // inputControl.classList.add("form-control-file"); inputControl.classList.add("form-control"); inputControl.classList.add("table-file"); inputControl.classList.add("basicInputFile"); inputControl.accept = ".png, .jpg, .pdf, .doc, .docx, .xlsx, .csv, .xls" inputControl.name = "table-file" inputGroup.appendChild(inputControl); }; columnobject.customGetter = function(idPrefix, name, uniqueIndex) { var controlId = idPrefix + "_" + uniqueIndex; return $('#' + controlId + '').attr('uploaded'); }; columnobject.customSetter = function(idPrefix, name, uniqueIndex, value) { var controlId = idPrefix + "_" + uniqueIndex; if (value == undefined) { $('#' + controlId + '').replaceWith( "<span> No file uploaded</span>") } else { $('#' + controlId + '').replaceWith( "<a class='form-control table-file basicInputFile' id='" + idPrefix + "_" + uniqueIndex + "' name='" + idPrefix + "_" + uniqueIndex + "'href='" + value + "' uploaded='" + value + "''> Your uploaded file</a>") } // document.getElementById(controlId).value = value; } } columnobject.displayCss = { "color": "#ffffff" }; columns.push(columnobject); } var initsettings = { uiFramework: "bootstrap4", iconFramework: "fontawesome5", element: obj, columns: columns, hideRowNumColumn: true, initRows: 2, sizing: "small", hideButtons: { insert: true, moveUp: true, moveDown: true } }; if ($(this)[0].hasAttribute("prefill")) { var stringtoparse = hex2String($(this).attr("prefill")).replace(/\\/g, ""); stringtoparse = stringtoparse.substring(1, stringtoparse.length - 1); var prefill = new Object; if (isJSON(stringtoparse)) { prefill = JSON.parse(stringtoparse); } else { columns = []; const myArray = stringtoparse.split(", "); for (q = 0; q < myArray.length; q++) { var insideard = myArray[q].split(": "); var columnobject = new Object; columnobject.name = insideard[0]; columnobject.display = insideard[0]; columnobject.type = type; columnobject.displayCss = { "color": "#ffffff" }; columns.push(columnobject); prefill[insideard[0]] = insideard[1]; } initsettings.columns = columns; } initsettings.initData = prefill; if ($(this)[0].hasAttribute("isdisabled")) { initsettings.hideButtons = { insert: true, moveUp: true, moveDown: true, remove: true, append: true, removeLast: true }; } } var myAppendGrid = new AppendGrid(initsettings); listoftables[$(this).attr("id")] = myAppendGrid; }); var draftList = dataparsed["unionFormQuestions"]; var draftstatus = 0; for (i = 0; i < draftList.length; i++) { if (draftList[i].draftmode == 1) { draftstatus = 1; break; } } if (getUrlParameter("uuid") && draftstatus == 1) { $("#memlinktext").text("Update"); } else if (getUrlParameter("uuid") && draftstatus == 0) { $("#submitbtn").addClass("d-none"); } //UFVSUS GRANT Customisation $('input[type=radio][name="What stage are you claiming for?*"]').change(function() { if (this.value == 'Initial 50%') { $(".range__slider").find('input[type=text]').prop('disabled', true); $(".range__slider").find('input[type=range]').prop('disabled', true); } else if (this.value == 'Post-Event 50%') { $(".range__slider").find('input[type=text]').prop('disabled', false); $(".range__slider").find('input[type=range]').prop('disabled', false); } }); if (getUrlParameter("star") && getUrlParameter("toemail")) { submitForm(false); } //ECUSG Affiliation Customisation if (getUrlParameter("fid") == "65" && $( "[name*='Do you want a Basic or Funded Affiliation?']").is( '[disabled=disabled]') == false) { $("#stagesrow .form-group").addClass("d-none toreverse"); $(":contains(Do you want a Basic or Funded Affiliation?)").removeClass("d-none"); $("#submitbtn").addClass("d-none"); $('input[type=radio][name="Do you want a Basic or Funded Affiliation?*"]').change( function() { $(".toreverse").removeClass("d-none toreverse"); $("#submitbtn").removeClass("d-none"); var disable = true; var mandt = "0"; if (this.value == 'Funded') { disable = false; mandt = "1"; } $("[name*='Does your organisation have any form of sponsorship, funding arrangement, or agreements with any external organisations, or is your organisation currently considering entering into one of those relationships with an external organisation?']") .prop("disabled", disable).attr("mandatory", mandt); $("[name*='If you answered \"Yes\" to the last question, provide details of all sponsorships, funding arrangements or agreements your organisation currently has or is considering entering.']") .prop("disabled", disable); $("[name*='will now be provided with a pre-paid VascoPay card in lieu of a bank account. Clubs can still elect to have a club bank account however it is no longer mandatory. Does your club also have a bank account?']") .prop("disabled", disable).attr("mandatory", mandt); $("[name*='Bank Name']").prop("disabled", disable); $("[name*='Account Signatory 1']").prop("disabled", disable); $("[name*='Account Signatory 2']").prop("disabled", disable); $("[name*='BSB']").prop("disabled", disable); $("[name*='Account Number']").prop("disabled", disable); }); } else if (getUrlParameter("fid") == "65" && $( "[name*='Do you want a Basic or Funded Affiliation?']").is( '[disabled=disabled]')) { $(".toreverse").removeClass("d-none toreverse"); $("#submitbtn").removeClass("d-none"); var disable = true; var mandt = "0"; if ($('input[type=radio][name="Do you want a Basic or Funded Affiliation?*"]') .value == 'Funded') { disable = false; mandt = "1"; } $("[name*='Does your organisation have any form of sponsorship, funding arrangement, or agreements with any external organisations, or is your organisation currently considering entering into one of those relationships with an external organisation?']") .prop("disabled", disable).attr("mandatory", mandt); $("[name*='If you answered \"Yes\" to the last question, provide details of all sponsorships, funding arrangements or agreements your organisation currently has or is considering entering.']") .prop("disabled", disable); $("[name*='will now be provided with a pre-paid VascoPay card in lieu of a bank account. Clubs can still elect to have a club bank account however it is no longer mandatory. Does your club also have a bank account?']") .prop("disabled", disable).attr("mandatory", mandt); $("[name*='Bank Name']").prop("disabled", disable); $("[name*='Account Signatory 1']").prop("disabled", disable); $("[name*='Account Signatory 2']").prop("disabled", disable); $("[name*='BSB']").prop("disabled", disable); $("[name*='Account Number']").prop("disabled", disable); } var submittedResponses = new Array(); $("#submitforms").click(function() { $("#errormessage").addClass("d-none"); //assume the form is true and then list out instances where it will be false var allgood = true; //looping through to check if every visible form question which is mandatory is filled out correctly EXCEPT radio buttons since it a default option is always selected $(".togoover").each(function() { //Ignore the hidden divs and only check the visible ones if ($(this).is(':visible') == false) {} else if ($(this) .hasClass("form-control-file") && $(this) .attr( "mandatory") == "1" && $(this).hasClass("uploaded") == false) { $("#errortext").text("Incorrect question: " + $(this) .attr( "name") + "' must have a file uploaded"); $("#errormessage").removeClass("d-none"); allgood = false; } else if ($(this).hasClass('linkbtn') && $(this).attr( "mandatory") == "1" && $(this).hasClass("clicked") == false) { $("#errortext").text("Incorrect question: " + $(this) .attr( "name") + "' link must be clicked to submit form"); $("#errormessage").removeClass("d-none"); allgood = false; } //False condition for Big text and small text else if (($(this).is(':text') || $(this).is('textarea')) && $(this).val().trim().length < 1 && $(this).attr("mandatory") == "1" && allgood == true) { $("#errortext").text("Incorrect question: " + $(this) .attr( "name")); $("#errormessage").removeClass("d-none"); allgood = false; } //False condition for Signature else if ($(this).hasClass("signatureholder") && $(this).attr("mandatory") == "1" && window["sig" + $(this).attr("questionid")].isEmpty() && allgood == true) { $("#errortext").text("Incorrect question: " + $(this) .attr( "name")); $("#errormessage").removeClass("d-none"); allgood = false; } //False condition for checkboxes else if ($(this).hasClass("checkboxes") && $(this).attr("mandatory") == "1" && allgood == true) { var atleastonechecked = false; $(this).find(":checked").each(function() { atleastonechecked = true; }); if (atleastonechecked == false) { $("#errortext").text( "Incorrect value for question: " + $(this).attr( "name")); $("#errormessage").removeClass("d-none"); allgood = false; } } // RADIO BUTTONS else if ($(this).hasClass("radiobuttons") && $(this).attr( "mandatory") == "1" && allgood == true) { // check if any of the input fields have the mandatory attribute = 1 var atleastonechecked = false; $(this).find("input:checked").each(function() { atleastonechecked = true; }); if (atleastonechecked == false) { $("#errortext").text( "Incorrect value for question: " + $(this).attr( "name")); $("#errormessage").removeClass("d-none"); allgood = false; } } else if ($(this).is('table') && $(this).attr("mandatory") == "1" && allgood == true) { if ($(this).find("textarea").length > 0 && $($(this).find( "textarea")[0]).val().length === 0) { $("#errortext").text( "Response required for question: " + $(this) .closest("div").find("label").text()); $("#errormessage").removeClass("d-none"); allgood = false; } if ($(this).find("input").length > 0 && $($(this).find( "input")[0]).val().length === 0) { $("#errortext").text( "Response required for question: " + $(this) .closest("div").find("label").text()); $("#errormessage").removeClass("d-none"); allgood = false; } } }); if ($(".newsoc").length) { emailverificationrequired = true; } else if ($("#useremail").length) { emailverificationrequired = true; } if (getUrlParameter("ed")) { emailverificationrequired = false; } else if ($.jStorage.get('sessionid')) { emailverificationrequired = false; } if (allgood == true && $("#useremail").length && ($("#useremail").val() .trim() .length < 5 || $("#useremail").val().trim().includes("@") == false )) { $("#errortext").text("Invalid Email Address"); $("#errormessage").removeClass("d-none"); allgood = false; } else if (allgood == true && $(".newsoc").length && $("#socname").val() .trim().length < 3) { $("#errortext").text("Invalid Society Name"); $("#errormessage").removeClass("d-none"); allgood = false; } else if (allgood == true && $(".newsoc").length && $("#socemail").val() .trim() .length < 5) { $("#errortext").text("Invalid Society Email"); $("#errormessage").removeClass("d-none"); allgood = false; } else if (allgood == true && $("#socusername").length && ($("#socusername") .val().trim() .length < 4 || $("#socusername") .val().trim().includes(" ")) && $("#socusername").is(":visible")) { $("#errortext").text( "Invalid Society Account username - must be at least 4 characters and contain no space characters" ); $("#errormessage").removeClass("d-none"); allgood = false; } else if (allgood == true && $("#socusername").length && $("#socpassword") .val().trim() .length < 8 && $("#socpassword").is(":visible")) { $("#errortext").text( "Invalid Society Account password - must be at least 8 characters" ); $("#errormessage").removeClass("d-none"); allgood = false; } if (allgood == true && emailverificationrequired == true) { var emailverificationobject = new Object; if ($("#useremail").length) { emailverificationobject.email = $("#useremail").val(); } else { emailverificationobject.email = $("#socemail").val(); } emailverificationobject.formid = formid; emailverificationobject.uuid = uuid; makeCall("sendFormEmailVerificationCode", emailverificationobject, 25000, false, true, function(dataparsed) { if (dataparsed.hasOwnProperty('success') && dataparsed[ "success"] == false) { $("#errormessage").removeClass("d-none"); $("#errormessage").text(dataparsed["usererror"]); } else if (dataparsed.hasOwnProperty('success') && dataparsed[ "success"] == true) { $("#formholder").addClass("d-none"); $("#resetholdertwo").removeClass("d-none"); } }, "#submitforms"); } else if (allgood == true) { submitForm(false); } }); } else if (dataparsed.hasOwnProperty('usererror')) { $("#unilogo").addClass("d-none"); $("#submitbtn").addClass("d-none"); $("#formtitle").text("Ooops, looks like you're in the wrong area!"); $("#formdescription").html( "Go back to your <a href='/login'>society portal</a> or our <a href='https://www.getqpay.com'> website </a>" ) alert(dataparsed["usererror"]); } else { $("#unilogo").addClass("d-none"); $("#submitbtn").addClass("d-none"); alert("Sorry, something went wrong. Please try again later"); } }, ); }); </script> <!-- END PAGE LEVEL JS--> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10