6
This commit is contained in:
parent
26991ad766
commit
781eb00786
@ -271,6 +271,10 @@ body.page-id-49 #wp--skip-link--target{margin-block-start:0!important}body.page-
|
||||
|
||||
.mlms-proof-modal{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;padding:24px}.mlms-proof-modal.open{display:flex}.mlms-proof-backdrop{position:absolute;inset:0;background:rgba(7,24,45,.62);backdrop-filter:blur(8px)}.mlms-proof-dialog{position:relative;z-index:1;width:min(640px,100%);max-height:92vh;overflow:auto;background:#fff;border:1px solid rgba(10,37,64,.10);border-radius:30px;box-shadow:0 28px 80px rgba(7,24,45,.28);padding:26px}.mlms-proof-dialog:before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--mlms-primary),var(--mlms-green));border-radius:30px 30px 0 0}.mlms-proof-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.mlms-proof-head h3{margin:0;color:var(--mlms-ink);font-size:28px;letter-spacing:-.04em;line-height:1.08}.mlms-proof-head p{margin:7px 0 0;color:var(--mlms-muted);line-height:1.45}.mlms-proof-close{width:42px;height:42px;border:0;border-radius:15px;background:#F2F6FA;color:var(--mlms-ink);font-size:24px;line-height:1;cursor:pointer}.mlms-proof-close:hover{background:#E7EDF5}.mlms-proof-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mlms-proof-dialog .mlms-field.full{grid-column:1/-1}.mlms-proof-file{border:1px dashed #C9D6E5;border-radius:18px;background:#F8FAFD;padding:14px}.mlms-proof-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px}.mlms-proof-status{margin:0;color:#08785B;font-weight:850}.mlms-portfolio-card.proof-attached{border-color:rgba(33,197,142,.36);box-shadow:0 18px 42px rgba(33,197,142,.12)}.mlms-portfolio-card.proof-attached:after{content:"Proof attached";position:absolute;top:14px;right:14px;border-radius:999px;background:#ECFBF6;color:#08785B;border:1px solid rgba(33,197,142,.26);padding:7px 10px;font-size:12px;font-weight:950}.mlms-portfolio-link.is-attached{color:#08785B}@media (max-width:640px){.mlms-proof-dialog{padding:22px;border-radius:24px}.mlms-proof-grid{grid-template-columns:1fr}.mlms-proof-actions{display:grid}.mlms-proof-actions .mlms-btn{width:100%;justify-content:center}.mlms-proof-head h3{font-size:24px}}
|
||||
|
||||
|
||||
/* WAX Coach consultation wizard */
|
||||
.mlms-coach-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 22px}.mlms-coach-progress button{position:relative;text-align:left;border:1px solid #DDE6F0;background:#fff;border-radius:18px;padding:13px 13px 12px 52px;min-height:72px;color:var(--mlms-muted);box-shadow:0 8px 20px rgba(50,50,93,.05);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}.mlms-coach-progress button:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(50,50,93,.10);border-color:rgba(99,91,255,.30)}.mlms-coach-progress span{position:absolute;left:13px;top:15px;width:30px;height:30px;border-radius:12px;display:grid;place-items:center;background:#F2F6FA;color:#5E6E82;font-weight:950}.mlms-coach-progress strong{display:block;color:var(--mlms-ink);font-size:14px;line-height:1.1}.mlms-coach-progress small{display:block;color:var(--mlms-soft);font-size:12px;font-weight:750;margin-top:4px}.mlms-coach-progress button.active,.mlms-coach-progress button.complete{border-color:rgba(99,91,255,.34);background:linear-gradient(135deg,#fff,#F8F7FF)}.mlms-coach-progress button.active span{background:var(--mlms-primary);color:#fff;box-shadow:0 0 0 7px rgba(99,91,255,.11)}.mlms-coach-progress button.complete span{background:#ECFBF6;color:#08785B}.mlms-coach-panel{display:none;animation:mlmsFadeUp .24s ease both}.mlms-coach-panel.active{display:block}.mlms-coach-panel h2{font-size:clamp(28px,3vw,38px);line-height:1.06;letter-spacing:-.04em;margin:0 0 10px;color:var(--mlms-ink)}.mlms-coach-panel>p:not(.mlms-onboarding-step-label){color:var(--mlms-muted);margin:0 0 22px}.mlms-coach-tip{border-radius:18px;padding:14px 16px;background:linear-gradient(135deg,#F6F4FF,#F8FAFD);border:1px solid rgba(99,91,255,.16);color:#3C4770;margin:16px 0 0;font-size:15px;line-height:1.45}.mlms-coach-tip strong{color:var(--mlms-primary)}.mlms-coach-review{border-radius:22px;border:1px solid #DDE6F0;background:#F8FAFD;padding:18px;margin:18px 0 0}.mlms-coach-review>strong{display:block;color:var(--mlms-ink);font-size:18px;margin-bottom:10px}.mlms-coach-review ul{margin:0;padding:0;list-style:none;display:grid;gap:9px}.mlms-coach-review li{display:flex;justify-content:space-between;gap:14px;border-top:1px solid #E5ECF4;padding-top:9px;color:var(--mlms-muted)}.mlms-coach-review li:first-child{border-top:0;padding-top:0}.mlms-coach-review span{font-weight:850}.mlms-coach-review b{color:var(--mlms-ink);text-align:right}.mlms-coach-loading{width:100%}@media (max-width:900px){.mlms-coach-progress{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:560px){.mlms-coach-progress{grid-template-columns:1fr}.mlms-coach-progress button{min-height:auto}.mlms-coach-review li{display:grid;gap:2px}.mlms-coach-review b{text-align:left}}
|
||||
|
||||
CSS;
|
||||
}
|
||||
|
||||
@ -1164,8 +1168,77 @@ function matthew_lms_mvp_js(): string {
|
||||
restoreProofState();
|
||||
}
|
||||
|
||||
|
||||
function initWaxCoachWizard(){
|
||||
var form=document.querySelector('[data-mlms-coach-wizard]');
|
||||
if(!form){return;}
|
||||
var panels=[].slice.call(form.querySelectorAll('[data-mlms-coach-panel]'));
|
||||
var steps=[].slice.call(form.querySelectorAll('[data-mlms-coach-jump]'));
|
||||
var current=0;
|
||||
function visibleFields(panel){
|
||||
return [].slice.call(panel.querySelectorAll('input, textarea, select')).filter(function(field){return field.type!=='hidden' && field.offsetParent!==null;});
|
||||
}
|
||||
function validPanel(panel){
|
||||
var fields=visibleFields(panel);
|
||||
for(var i=0;i<fields.length;i++){
|
||||
if(!fields[i].checkValidity()){
|
||||
fields[i].reportValidity();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function updateReview(){
|
||||
form.querySelectorAll('[data-mlms-review]').forEach(function(item){
|
||||
var field=form.querySelector('[name="'+item.getAttribute('data-mlms-review')+'"]');
|
||||
var value=field && field.value ? field.value.trim() : '';
|
||||
item.textContent=value || 'Not added yet';
|
||||
});
|
||||
}
|
||||
function show(index){
|
||||
index=Math.max(0,Math.min(panels.length-1,index));
|
||||
current=index;
|
||||
panels.forEach(function(panel,i){panel.classList.toggle('active',i===current);});
|
||||
steps.forEach(function(step,i){
|
||||
step.classList.toggle('active',i===current);
|
||||
step.classList.toggle('complete',i<current);
|
||||
step.setAttribute('aria-current',i===current ? 'step' : 'false');
|
||||
});
|
||||
updateReview();
|
||||
}
|
||||
form.querySelectorAll('[data-mlms-coach-next]').forEach(function(button){
|
||||
button.addEventListener('click',function(){
|
||||
if(validPanel(panels[current])){show(current+1);}
|
||||
});
|
||||
});
|
||||
form.querySelectorAll('[data-mlms-coach-prev]').forEach(function(button){
|
||||
button.addEventListener('click',function(){show(current-1);});
|
||||
});
|
||||
steps.forEach(function(step){
|
||||
step.addEventListener('click',function(){
|
||||
var target=parseInt(step.getAttribute('data-mlms-coach-jump')||'0',10);
|
||||
if(target<=current || validPanel(panels[current])){show(target);}
|
||||
});
|
||||
});
|
||||
form.querySelectorAll('input, textarea').forEach(function(field){field.addEventListener('input',updateReview);});
|
||||
form.addEventListener('submit',function(event){
|
||||
for(var i=0;i<panels.length;i++){
|
||||
if(!validPanel(panels[i])){
|
||||
event.preventDefault();
|
||||
show(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
var loading=form.querySelector('.mlms-coach-loading');
|
||||
if(loading){loading.classList.add('active');}
|
||||
form.querySelectorAll('button').forEach(function(button){button.disabled=true;});
|
||||
});
|
||||
show(0);
|
||||
}
|
||||
|
||||
function initAll(){
|
||||
initWaxOnboarding();
|
||||
initWaxCoachWizard();
|
||||
initWaxCourseDashboard();
|
||||
initWaxTutor();
|
||||
initWaxProofModal();
|
||||
@ -2417,19 +2490,66 @@ add_shortcode('matthew_career_coach', function () {
|
||||
<?php elseif (is_array($result) && empty($result['success'])): ?>
|
||||
<div class="mlms-notice"><strong>Saved with a note:</strong> <?php echo esc_html($result['message']); ?></div>
|
||||
<?php endif; ?>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<form method="post" enctype="multipart/form-data" id="mlms-coach-form" data-mlms-coach-wizard>
|
||||
<?php wp_nonce_field('mlms_coach_submit', 'mlms_coach_nonce'); ?>
|
||||
<div class="mlms-steps"><span class="mlms-step active"></span><span class="mlms-step active"></span><span class="mlms-step"></span></div>
|
||||
<p class="mlms-help">We use your answers only to generate this coaching plan and save your request for follow-up.</p>
|
||||
<div class="mlms-form-grid">
|
||||
<div class="mlms-field"><label for="mlms_name">Name</label><input id="mlms_name" name="mlms_name" required placeholder="Alex Morgan"></div>
|
||||
<div class="mlms-field"><label for="mlms_email">Email</label><input id="mlms_email" name="mlms_email" type="email" required placeholder="alex@example.com"></div>
|
||||
<div class="mlms-field"><label for="mlms_current_role">Current role</label><input id="mlms_current_role" name="mlms_current_role" required placeholder="Marketing Director"></div>
|
||||
<div class="mlms-field"><label for="mlms_target_role">Target role / aspiration</label><input id="mlms_target_role" name="mlms_target_role" required placeholder="AI-native growth leader"></div>
|
||||
<div class="mlms-coach-progress" aria-label="Consultation profile steps">
|
||||
<button type="button" class="active" data-mlms-coach-jump="0"><span>1</span><strong>Basics</strong><small>Who you are</small></button>
|
||||
<button type="button" data-mlms-coach-jump="1"><span>2</span><strong>Current work</strong><small>Where you are</small></button>
|
||||
<button type="button" data-mlms-coach-jump="2"><span>3</span><strong>AI goal</strong><small>What should change</small></button>
|
||||
<button type="button" data-mlms-coach-jump="3"><span>4</span><strong>Review</strong><small>Send to coach</small></button>
|
||||
</div>
|
||||
<p class="mlms-help">We use your answers only to generate this coaching plan and save your request for follow-up. Complete one short step at a time.</p>
|
||||
|
||||
<div class="mlms-coach-panel active" data-mlms-coach-panel>
|
||||
<p class="mlms-onboarding-step-label">Step 1 of 4 · Your consultation basics</p>
|
||||
<h2>Start with your contact details.</h2>
|
||||
<p>WAX uses this to label your consultation profile and make the follow-up feel personal.</p>
|
||||
<div class="mlms-form-grid">
|
||||
<div class="mlms-field"><label for="mlms_name">Name</label><input id="mlms_name" name="mlms_name" required placeholder="Alex Morgan" value="<?php echo esc_attr(sanitize_text_field(wp_unslash($_POST['mlms_name'] ?? ''))); ?>"></div>
|
||||
<div class="mlms-field"><label for="mlms_email">Email</label><input id="mlms_email" name="mlms_email" type="email" required placeholder="alex@example.com" value="<?php echo esc_attr(sanitize_email(wp_unslash($_POST['mlms_email'] ?? ''))); ?>"></div>
|
||||
</div>
|
||||
<div class="mlms-coach-tip"><strong>Why this matters:</strong> your coach plan is saved as a private request so the team can follow up with next-step guidance.</div>
|
||||
<div class="mlms-onboarding-actions"><button class="mlms-btn mlms-btn-primary" type="button" data-mlms-coach-next>Next: current work →</button></div>
|
||||
</div>
|
||||
|
||||
<div class="mlms-coach-panel" data-mlms-coach-panel>
|
||||
<p class="mlms-onboarding-step-label">Step 2 of 4 · Where you are now</p>
|
||||
<h2>Tell WAX your current and target role.</h2>
|
||||
<p>This gives the coach enough context to compare today’s responsibilities with the AI-native role you want.</p>
|
||||
<div class="mlms-form-grid">
|
||||
<div class="mlms-field"><label for="mlms_current_role">Current role</label><input id="mlms_current_role" name="mlms_current_role" required placeholder="Marketing Director" value="<?php echo esc_attr(sanitize_text_field(wp_unslash($_POST['mlms_current_role'] ?? ''))); ?>"></div>
|
||||
<div class="mlms-field"><label for="mlms_target_role">Target role / aspiration</label><input id="mlms_target_role" name="mlms_target_role" required placeholder="AI-native growth leader" value="<?php echo esc_attr(sanitize_text_field(wp_unslash($_POST['mlms_target_role'] ?? ''))); ?>"></div>
|
||||
</div>
|
||||
<div class="mlms-coach-tip"><strong>Tip:</strong> if you are not sure about the target role, describe the outcome instead, like “lead a small team using AI workflows.”</div>
|
||||
<div class="mlms-onboarding-actions"><button class="mlms-btn mlms-btn-secondary" type="button" data-mlms-coach-prev>Back</button><button class="mlms-btn mlms-btn-primary" type="button" data-mlms-coach-next>Next: AI goal →</button></div>
|
||||
</div>
|
||||
|
||||
<div class="mlms-coach-panel" data-mlms-coach-panel>
|
||||
<p class="mlms-onboarding-step-label">Step 3 of 4 · What should feel easier</p>
|
||||
<h2>Describe the work problem you want AI to solve.</h2>
|
||||
<p>Use normal language. Mention repetitive tasks, decisions, reporting, client work, handoffs, or the career move you want to make.</p>
|
||||
<div class="mlms-field"><label for="mlms_goal">What would make AI feel immediately useful at work?</label><textarea id="mlms_goal" name="mlms_goal" required placeholder="Tell the coach where you feel behind, what you want to automate, or what career outcome matters most."><?php echo esc_textarea(sanitize_textarea_field(wp_unslash($_POST['mlms_goal'] ?? ''))); ?></textarea></div>
|
||||
<div class="mlms-coach-tip"><strong>Example:</strong> “I spend too much time turning meeting notes into client updates and want a repeatable AI workflow.”</div>
|
||||
<div class="mlms-onboarding-actions"><button class="mlms-btn mlms-btn-secondary" type="button" data-mlms-coach-prev>Back</button><button class="mlms-btn mlms-btn-primary" type="button" data-mlms-coach-next>Next: review →</button></div>
|
||||
</div>
|
||||
|
||||
<div class="mlms-coach-panel" data-mlms-coach-panel>
|
||||
<p class="mlms-onboarding-step-label">Step 4 of 4 · Optional proof and submit</p>
|
||||
<h2>Attach extra context, then generate your path.</h2>
|
||||
<p>Your typed answers power the instant AI plan. A resume can help the team understand your background for follow-up.</p>
|
||||
<div class="mlms-field"><label for="mlms_resume">Resume upload (optional)</label><input id="mlms_resume" name="mlms_resume" type="file" accept=".pdf,.doc,.docx,.txt"><p class="mlms-help">Privacy note: the file is attached to your follow-up request; this instant AI plan is based on your typed answers.</p></div>
|
||||
<div class="mlms-coach-review" aria-live="polite">
|
||||
<strong>Quick profile review</strong>
|
||||
<ul>
|
||||
<li><span>Name</span><b data-mlms-review="mlms_name">Not added yet</b></li>
|
||||
<li><span>Email</span><b data-mlms-review="mlms_email">Not added yet</b></li>
|
||||
<li><span>Current role</span><b data-mlms-review="mlms_current_role">Not added yet</b></li>
|
||||
<li><span>Target</span><b data-mlms-review="mlms_target_role">Not added yet</b></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mlms-onboarding-actions"><button class="mlms-btn mlms-btn-secondary" type="button" data-mlms-coach-prev>Back</button><button class="mlms-btn mlms-btn-primary" type="submit">Generate my AI career path →</button></div>
|
||||
<div class="mlms-building-profile mlms-coach-loading" aria-live="polite"><strong>Preparing your consultation profile…</strong><p>WAX is reading your answers and building a practical AI career path.</p><div class="mlms-loading-dots"><i></i><i></i><i></i></div></div>
|
||||
</div>
|
||||
<div class="mlms-field"><label for="mlms_goal">What would make AI feel immediately useful at work?</label><textarea id="mlms_goal" name="mlms_goal" required placeholder="Tell the coach where you feel behind, what you want to automate, or what career outcome matters most."></textarea></div>
|
||||
<div class="mlms-field"><label for="mlms_resume">Resume upload (optional)</label><input id="mlms_resume" name="mlms_resume" type="file" accept=".pdf,.doc,.docx,.txt"><p class="mlms-help">Privacy note: the file is attached to your follow-up request; this instant AI plan is based on your typed answers.</p></div>
|
||||
<button class="mlms-btn mlms-btn-primary" type="submit">Generate my AI career path →</button>
|
||||
</form>
|
||||
</div>
|
||||
</div></section></div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user