Sandata templates for the sign up form. Removed a few test scripts I don't need anymore. Created an Acatble dir.
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
{% styles colors %}
|
||||
{% styles custom %}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
(function(apiKey){
|
||||
(function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=o._q||[];
|
||||
@ -23,4 +25,4 @@
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -16,11 +16,11 @@
|
||||
|
||||
{% include "messages" %}
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
setTimeout(function(){
|
||||
if (window.location.pathname == "/auth/auth_url_email/login") {
|
||||
document.getElementsByClassName("np-input-label")[2].innerHTML = "Work Email Address";
|
||||
// document.getElementsByClassName("np-input-label")[2].innerHTML = "Work Email Address";
|
||||
if (document.getElementsByClassName("np-alert-wrapper").length != 0) {
|
||||
document.getElementsByClassName("np-alert-wrapper")[0].innerHTML = "Please complete the following information to access Artera";
|
||||
document.getElementsByClassName("np-alert-wrapper")[0].innerHTML = "Please complete the following information to access Artera";
|
||||
}
|
||||
};
|
||||
}, 500);
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
<script src="https://fast.wistia.net/assets/external/E-v1.js" async></script>
|
||||
|
||||
{%comment%} <script src="//fast.wistia.com/embed/medias/s3lqfi0zn7.jsonp" async></script>
|
||||
<script src="//fast.wistia.com/assets/external/E-v1.js" async></script>{%endcomment%}
|
||||
<main class="np-box-container np-open-access">
|
||||
<div class="np-box">
|
||||
{% include "header_minimal" %}
|
||||
@ -12,19 +8,10 @@
|
||||
{% t shared.welcome_to_school, school_name: current_school.name %}
|
||||
</div>
|
||||
<div class="np-form-subheadline">
|
||||
Check out the video below for a quick tour of Artera Academy.<br>Then, enter your first name, last name, and your work email address below to get started.
|
||||
{% t .headline, key: current_school.course_vocabulary %}
|
||||
</div>
|
||||
|
||||
{%comment%}<div class="intro-video wistia_embed videoFoam=true playbar=false volumeControl=false smallPlayButton=false settingsControl=false autoPlay=true wistia_async_fl9lthnnox" style="width: 100%; height: auto; margin-bottom: 20px;"> </div>{%endcomment%}
|
||||
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;">
|
||||
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
|
||||
<iframe src="https://fast.wistia.net/embed/iframe/fl9lthnnox?seo=false&videoFoam=true" title="LearnWELL Intro Video" allow="autoplay; fullscreen" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" msallowfullscreen width="100%" height="100%"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_first_name">
|
||||
<label class="np-input-label" for="learner_first_name" style="color: black;">
|
||||
{% t shared.first_name %}
|
||||
</label>
|
||||
<input
|
||||
@ -37,7 +24,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_last_name">
|
||||
<label class="np-input-label" for="learner_last_name" style="color: black;">
|
||||
{% t shared.last_name %}
|
||||
</label>
|
||||
<input
|
||||
@ -49,8 +36,8 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_email">
|
||||
{% t shared.email_address %}
|
||||
<label class="np-input-label" for="learner_email" style="color: black;">
|
||||
Company Email
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
@ -60,13 +47,57 @@
|
||||
value="{{ form.email }}"
|
||||
/>
|
||||
</div>
|
||||
<p style="display: none;" id="bad_email_alert">Please Enter Your Company Email</p>
|
||||
<input
|
||||
type="submit"
|
||||
name="commit"
|
||||
value="{% t shared.enter %}"
|
||||
id="submit_button"
|
||||
class="np-button np-button-big np-form-action"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script>
|
||||
// document.getElementById("header").scrollIntoView();
|
||||
|
||||
function checkIfInputsExist (){
|
||||
window.setTimeout(function(){
|
||||
// Regular expression to check if string is email
|
||||
const regexExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
|
||||
// Grabs Email Address Value
|
||||
const learnerEmail = $("#learner_email")[0].value;
|
||||
|
||||
const blockedEmails = [ "gmail.com", "yahoo.com" ]
|
||||
// "hotmail.com", "aol.com", "outlook.com", "icloud.com", "me.com", "mac.com" ]
|
||||
|
||||
if ($("#learner_email")[0].value.length > 0){
|
||||
if(regexExp.test(learnerEmail) == true){
|
||||
var slicedEmail = learnerEmail.split('@');
|
||||
if (blockedEmails.indexOf(slicedEmail[1]) > -1) {
|
||||
$("#learner_email").css("background", "salmon");
|
||||
$("#bad_email_alert").css("display", "block");
|
||||
$("#submit_button").css("pointer-events","none");
|
||||
}
|
||||
else {
|
||||
$("#learner_email").css("background", "#f2f4f5");
|
||||
$("#bad_email_alert").css("display", "none");
|
||||
$("#submit_button").css("pointer-events", "auto");
|
||||
}
|
||||
} else {
|
||||
$("#learner_email").css("background", "#f2f4f5");
|
||||
$("#bad_email_alert").css("display", "none");
|
||||
$("#submit_button").css("pointer-events", "auto");
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
document.addEventListener('keyup', checkIfInputsExist);
|
||||
</script>
|
||||
<style>
|
||||
.np-input-label{
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
<main class="np-main np-box-container">
|
||||
<div class="np-box">
|
||||
{% include "header_minimal" %}
|
||||
<div class="np-box-content-container">
|
||||
<form class="np-form np-box-content" action="{% route sign_up %}" method="post" novalidate>
|
||||
<div class="np-form-title"> {% t .create_account %} </div>
|
||||
{% form_authenticity_token %}
|
||||
<div class="np-form-flex-desktop">
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_first_name">
|
||||
{% t shared.first_name %}
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
autofocus="autofocus"
|
||||
type="text"
|
||||
name="learner[first_name]"
|
||||
id="learner_first_name"
|
||||
>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_last_name">
|
||||
{% t shared.last_name %}
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
type="text"
|
||||
name="learner[last_name]"
|
||||
id="learner_last_name"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_email">
|
||||
Company Email
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
autofocus="autofocus"
|
||||
type="email"
|
||||
name="learner[email]"
|
||||
id="learner_email"
|
||||
>
|
||||
<p class="enter-label">Company Email</p>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_password">
|
||||
{% t shared.password %}
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
type="password"
|
||||
name="learner[password]"
|
||||
id="learner_password"
|
||||
>
|
||||
</div>
|
||||
<button type="submit" class="np-button np-button-big np-button-large-font np-form-action">
|
||||
{% t shared.sign_up %}
|
||||
</button>
|
||||
<span class="np-form-terms">
|
||||
{% t .terms %}
|
||||
<a
|
||||
class="np-form-link np-button-color"
|
||||
target="_blank"
|
||||
href="{{ current_school.terms_of_service_url }}"
|
||||
>
|
||||
{% t .terms_link %}
|
||||
</a>
|
||||
</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
Reference in New Issue
Block a user