v13 — телефон и email при регистрации
This commit is contained in:
parent
ca046a17aa
commit
925419643e
12
index.html
12
index.html
@ -219,6 +219,10 @@ input[type=file]{display:none}
|
||||
<datalist id="cityList"></datalist>
|
||||
</div>
|
||||
<input type="text" id="regCoach" placeholder="Тренер (ФИО)">
|
||||
<div class="grid2">
|
||||
<input type="tel" id="regPhone" placeholder="Телефон (WhatsApp)">
|
||||
<input type="email" id="regEmail" placeholder="Email">
|
||||
</div>
|
||||
<div class="grid2">
|
||||
<input type="text" id="regRank" placeholder="Разряд / звание">
|
||||
<input type="text" id="regGoal" placeholder="Главная цель">
|
||||
@ -486,6 +490,8 @@ function registerProfile() {
|
||||
country: document.getElementById('regCountry').value,
|
||||
city: document.getElementById('regCity').value.trim(),
|
||||
coach: document.getElementById('regCoach').value.trim(),
|
||||
phone: document.getElementById('regPhone').value.trim(),
|
||||
email: document.getElementById('regEmail').value.trim(),
|
||||
rank: document.getElementById('regRank').value.trim(),
|
||||
goal: document.getElementById('regGoal').value.trim(),
|
||||
photo: document.getElementById('regPhotoPreview').src || '',
|
||||
@ -496,7 +502,7 @@ function registerProfile() {
|
||||
profiles.push(profile);
|
||||
SS('profiles', profiles);
|
||||
// Clear form
|
||||
['regName','regLogin','regPass','regSport','regAge','regBirth','regCountry','regClub','regCity','regCoach','regRank','regGoal'].forEach(id => document.getElementById(id).value = '');
|
||||
['regName','regLogin','regPass','regSport','regAge','regBirth','regCountry','regClub','regCity','regCoach','regPhone','regEmail','regRank','regGoal'].forEach(id => document.getElementById(id).value = '');
|
||||
document.getElementById('regPhotoPreview').style.display = 'none';
|
||||
loginProfile(profile.id);
|
||||
}
|
||||
@ -640,6 +646,8 @@ function aiHelp(field) {
|
||||
regCoach: '👨‍🏫 Имя твоего тренера. Он будет рад, что ты здесь!',
|
||||
regRank: '🏅 Твой разряд или звание. Например: 1 юношеский, 3 взрослый.',
|
||||
regGoal: '🎯 Твоя главная цель! Например: 50 м в/с за 23 секунды.',
|
||||
regPhone: '📱 Твой номер телефона. Можно WhatsApp. Нужен, чтобы тренер или родители могли связаться.',
|
||||
regEmail: '✉️ Твоя почта. Пригодится для регистрации на соревнования и NCAA.',
|
||||
regPhoto: '📷 Загрузи своё фото — так твой профиль будет красивее!'
|
||||
};
|
||||
if (tips[field]) aiSay(tips[field]);
|
||||
@ -647,7 +655,7 @@ function aiHelp(field) {
|
||||
|
||||
// Attach focus listeners to all registration fields
|
||||
setTimeout(() => {
|
||||
const fields = ['regName','regLogin','regPass','regSport','regBirth','regCountry','regCity','regClub','regCoach','regRank','regGoal'];
|
||||
const fields = ['regName','regLogin','regPass','regSport','regBirth','regCountry','regCity','regClub','regCoach','regPhone','regEmail','regRank','regGoal'];
|
||||
fields.forEach(id => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) el.addEventListener('focus', () => aiHelp(id));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user