|
|
|
|
@ -32,28 +32,19 @@
|
|
|
|
|
|
|
|
|
|
{% comment %} <h1 class="sign-up-follow-up-prompt">State: </h1> {% endcomment %}
|
|
|
|
|
{% include "sign_up_follow_up_states_dropdown" %}
|
|
|
|
|
<input class="sign-up-follow-up-input" id="calEVV-input" placeholder="CalEVV Identifier" style="display: none;"/>
|
|
|
|
|
<input class="sign-up-follow-up-input" id="calEVV-input" placeholder="CalEVV Identifier" style="display: none;" onChange="validateForm()"/>
|
|
|
|
|
<span class="sign-up-follow-up-error-label" id="calEVV-label">Please enter a valid, 10 digit California EVV ID Number</span>
|
|
|
|
|
|
|
|
|
|
{% comment %} <input class="sign-up-follow-up-input" id="oh-input" placeholder="OH Identifier" style="display: none;"/> {% endcomment %}
|
|
|
|
|
<div id="oh-input" placeholder="OH Identifier" style="display: none;">
|
|
|
|
|
<div class='oh-button' type="radio" value="ST - OH EVV ODM Agency Provider"
|
|
|
|
|
<div id="evv-radio-buttons" placeholder="EVV Radio Buttons">
|
|
|
|
|
<div class='evv-radio-button' type="radio" value="ST - OH EVV ODM Agency Provider"
|
|
|
|
|
onclick="validateForm()">Agency EVV</div>
|
|
|
|
|
<div class='oh-button' type="radio" value="ST - OH EVV Non-Agency"
|
|
|
|
|
<div class='evv-radio-button' type="radio" value="ST - OH EVV Non-Agency"
|
|
|
|
|
onclick="validateForm()">Non-Agency EVV</div>
|
|
|
|
|
<div class='oh-button' type="radio" value="ST - OH ODM AGENCY PROVIDER ALT EVV"
|
|
|
|
|
<div class='evv-radio-button' type="radio" value="ST - OH ODM AGENCY PROVIDER ALT EVV"
|
|
|
|
|
onclick="validateForm()">Alternative EVV</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="ca-input" placeholder="CA Identifier" style="display: none;">
|
|
|
|
|
{% comment %} <div class='ca-button' type="radio" value="ST - CA CHHS BOTH (PCS & HHCS)" {% endcomment %}
|
|
|
|
|
<div class='ca-button' type="radio" value="EVV"
|
|
|
|
|
onclick="validateForm()">Agency EVV</div>
|
|
|
|
|
{% comment %} <div class='ca-button' type="radio" value="ST - CA CHHS JE & ST - CA CHHS STATE" {% endcomment %}
|
|
|
|
|
<div class='ca-button' type="radio" value="ALT EVV"
|
|
|
|
|
onclick="validateForm()">Alternative EVV</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="sign-up-follow-up-error-label" id="oh-label">Please select your affiliation</span>
|
|
|
|
|
<span class="sign-up-follow-up-error-label" id="evv-radio-label">Please select your affiliation</span>
|
|
|
|
|
|
|
|
|
|
{% comment %} <button class="sign-up-follow-up-button" onclick="submitData()">Submit</button> {% endcomment %}
|
|
|
|
|
<div class="sign-up-follow-up-button" onclick="submitData()">Submit</div>
|
|
|
|
|
@ -74,7 +65,7 @@
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#oh-input,
|
|
|
|
|
#evv-radio-buttons,
|
|
|
|
|
#ca-input {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
@ -86,12 +77,12 @@
|
|
|
|
|
#medicaid-id-label,
|
|
|
|
|
#provider-id-label,
|
|
|
|
|
#calEVV-label,
|
|
|
|
|
#oh-label {
|
|
|
|
|
#evv-radio-label {
|
|
|
|
|
color: red;
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.oh-button,
|
|
|
|
|
.evv-radio-button,
|
|
|
|
|
.ca-button {
|
|
|
|
|
border: 1px solid grey;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
@ -104,12 +95,12 @@
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.oh-button:hover,
|
|
|
|
|
.evv-radio-button:hover,
|
|
|
|
|
.ca-button:hover {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.oh-button:focus,
|
|
|
|
|
.evv-radio-button:focus,
|
|
|
|
|
.ca-button:focus {
|
|
|
|
|
background: pink;
|
|
|
|
|
}
|
|
|
|
|
@ -164,19 +155,20 @@
|
|
|
|
|
document.getElementById("sign-up-state-dropdown").addEventListener('change', (event) => {
|
|
|
|
|
if(event.target.value == 'California'){
|
|
|
|
|
document.querySelector('#calEVV-input').style.display = 'block';
|
|
|
|
|
document.querySelector('#ca-input').style.display = 'block';
|
|
|
|
|
// document.querySelector('#ca-input').style.display = 'block';
|
|
|
|
|
} else {
|
|
|
|
|
document.querySelector('#calEVV-input').style.display = 'none';
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'none';
|
|
|
|
|
document.querySelector('#ca-input').style.display = 'none';
|
|
|
|
|
// document.querySelector('#ca-input').style.display = 'none';
|
|
|
|
|
};
|
|
|
|
|
if(event.target.value == 'Ohio'){
|
|
|
|
|
console.log("Ohio selected!")
|
|
|
|
|
document.querySelector('#oh-input').style.display = 'block';
|
|
|
|
|
} else {
|
|
|
|
|
document.querySelector('#oh-input').style.display = 'none';
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'none';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if(event.target.value == 'Ohio'){
|
|
|
|
|
// console.log("Ohio selected!")
|
|
|
|
|
// document.querySelector('#oh-input').style.display = 'block';
|
|
|
|
|
// } else {
|
|
|
|
|
// document.querySelector('#oh-input').style.display = 'none';
|
|
|
|
|
// document.querySelector('#evv-radio-label').style.display = 'none';
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
|
|
|
@ -302,12 +294,12 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Ohio Additional Options
|
|
|
|
|
if(event.target.parentNode.getAttribute('placeholder') == 'OH Identifier'){
|
|
|
|
|
if(fullPropsObj['learner_state'] == 'Ohio'){
|
|
|
|
|
|
|
|
|
|
if(event.target.parentNode.getAttribute('placeholder') == 'EVV Radio Buttons'){
|
|
|
|
|
// if(fullPropsObj['learner_state'] == 'Ohio'){
|
|
|
|
|
if(event.target.getAttribute('value') == ''){
|
|
|
|
|
fullPropsObj['oh_group_name'] = undefined;
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'none';
|
|
|
|
|
fullPropsObj['evv_radio_selection'] = undefined;
|
|
|
|
|
document.querySelector('#evv-radio-label').style.display = 'none';
|
|
|
|
|
} else {
|
|
|
|
|
for(let i = 0; i < event.target.parentNode.children.length; i++){
|
|
|
|
|
event.target.parentNode.children[i].style.background = '#f2f4f5';
|
|
|
|
|
@ -319,24 +311,20 @@
|
|
|
|
|
let valid = true;
|
|
|
|
|
|
|
|
|
|
if(valid){
|
|
|
|
|
fullPropsObj['oh_group_name'] = event.target.getAttribute('value');
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'none';
|
|
|
|
|
fullPropsObj['evv_radio_selection'] = event.target.getAttribute('value');
|
|
|
|
|
document.querySelector('#evv-radio-label').style.display = 'none';
|
|
|
|
|
} else {
|
|
|
|
|
fullPropsObj['oh_group_name'] = undefined;
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'block';
|
|
|
|
|
fullPropsObj['evv_radio_selection'] = undefined;
|
|
|
|
|
document.querySelector('#evv-radio-label').style.display = 'block';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
fullPropsObj['oh_group_name'] = undefined;
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'none';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// California Additional Options
|
|
|
|
|
if(event.target.parentNode.getAttribute('placeholder') == 'CA Identifier'){
|
|
|
|
|
// California Additional Options
|
|
|
|
|
if(event.target.parentNode.getAttribute('placeholder') == 'CA Identifier'){
|
|
|
|
|
if(fullPropsObj['learner_state'] == 'California'){
|
|
|
|
|
if(event.target.getAttribute('value') == ''){
|
|
|
|
|
fullPropsObj['ca_group_name'] = undefined;
|
|
|
|
|
fullPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'none';
|
|
|
|
|
} else {
|
|
|
|
|
for(let i = 0; i < event.target.parentNode.children.length; i++){
|
|
|
|
|
@ -346,18 +334,18 @@
|
|
|
|
|
event.target.style.background = 'rgb(242, 169, 0)';
|
|
|
|
|
event.target.style.color = '#000';
|
|
|
|
|
|
|
|
|
|
let valid = true;
|
|
|
|
|
|
|
|
|
|
let valid = event.target.getAttribute('value').length == 10;
|
|
|
|
|
|
|
|
|
|
if(valid){
|
|
|
|
|
fullPropsObj['ca_group_name'] = event.target.getAttribute('value');
|
|
|
|
|
fullPropsObj['cal_evv_id'] = event.target.getAttribute('value');
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'none';
|
|
|
|
|
} else {
|
|
|
|
|
fullPropsObj['ca_group_name'] = undefined;
|
|
|
|
|
fullPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'block';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
fullPropsObj['ca_group_name'] = undefined;
|
|
|
|
|
fullPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'none';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -392,13 +380,11 @@
|
|
|
|
|
|
|
|
|
|
if(Object.keys(revisedPropsObj).length > 0){
|
|
|
|
|
let validationFlag = true;
|
|
|
|
|
if (revisedPropsObj['learner_state'] == 'Ohio') {
|
|
|
|
|
var allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'oh_group_name'];
|
|
|
|
|
} else if (revisedPropsObj['learner_state'] == 'California') {
|
|
|
|
|
var allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'ca_group_name'];
|
|
|
|
|
} else {
|
|
|
|
|
var allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role'];
|
|
|
|
|
}
|
|
|
|
|
if (revisedPropsObj['learner_state'] == 'California') {
|
|
|
|
|
var allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'evv_radio_selection', 'cal_evv_id'];
|
|
|
|
|
} else {
|
|
|
|
|
var allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'evv_radio_selection'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(let i = 0; i < allRequiredFields.length; i++){
|
|
|
|
|
if(Object.keys(revisedPropsObj).indexOf(allRequiredFields[i]) == -1){
|
|
|
|
|
@ -411,21 +397,23 @@
|
|
|
|
|
document.querySelector('#calEVV-input').style.borderRadius = '2px';
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'block';
|
|
|
|
|
} else {
|
|
|
|
|
validationFlag = true;
|
|
|
|
|
document.querySelector('#calEVV-input').style.border = '1px solid light-dark(rgb(118, 118, 118), rgb(133, 133, 133))';
|
|
|
|
|
document.querySelector('#calEVV-label').style.display = 'none';
|
|
|
|
|
revisedPropsObj['oh_group_name'] = undefined;
|
|
|
|
|
// revisedPropsObj['evv_radio_selection'] = undefined;
|
|
|
|
|
}
|
|
|
|
|
} else if(allRequiredFields[i] == 'learner_state' && revisedPropsObj[allRequiredFields[i]] == 'Ohio'){
|
|
|
|
|
if(Object.keys(revisedPropsObj).indexOf('oh_group_name') == -1){
|
|
|
|
|
validationFlag = false;
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'block';
|
|
|
|
|
} else {
|
|
|
|
|
document.querySelector('#oh-label').style.display = 'none';
|
|
|
|
|
revisedPropsObj['ca_group_name'] = undefined;
|
|
|
|
|
revisedPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
}
|
|
|
|
|
// else if(allRequiredFields[i] == 'learner_state' && revisedPropsObj[allRequiredFields[i]] == 'Ohio'){
|
|
|
|
|
// if(Object.keys(revisedPropsObj).indexOf('evv_radio_selection') == -1){
|
|
|
|
|
// validationFlag = false;
|
|
|
|
|
// document.querySelector('#evv-radio-label').style.display = 'block';
|
|
|
|
|
// } else {
|
|
|
|
|
// document.querySelector('#evv-radio-label').style.display = 'none';
|
|
|
|
|
// revisedPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
// revisedPropsObj['cal_evv_id'] = undefined;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(validationFlag){
|
|
|
|
|
@ -458,13 +446,9 @@
|
|
|
|
|
console.log('SUBMIT!')
|
|
|
|
|
console.log(userID);
|
|
|
|
|
|
|
|
|
|
if(revisedPropsObj['learner_state'] != 'Ohio'){
|
|
|
|
|
revisedPropsObj['oh_group_name'] = "None";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(revisedPropsObj['learner_state'] != 'California'){
|
|
|
|
|
revisedPropsObj['cal_evv_id'] = "None";
|
|
|
|
|
revisedPropsObj['ca_group_name'] = "None";
|
|
|
|
|
revisedPropsObj['cal_evv_id'] = "None";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(revisedPropsObj);
|
|
|
|
|
|