v13 — телефон и email при регистрации

This commit is contained in:
Dauren777 2026-06-01 11:09:26 +00:00
parent ca046a17aa
commit 925419643e

View File

@ -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: '&#x1F468;&#x200D;&#x1F3EB; Имя твоего тренера. Он будет рад, что ты здесь!',
regRank: '&#x1F3C5; Твой разряд или звание. Например: 1 юношеский, 3 взрослый.',
regGoal: '&#x1F3AF; Твоя главная цель! Например: 50 м в/с за 23 секунды.',
regPhone: '&#x1F4F1; Твой номер телефона. Можно WhatsApp. Нужен, чтобы тренер или родители могли связаться.',
regEmail: '&#x2709;&#xFE0F; Твоя почта. Пригодится для регистрации на соревнования и NCAA.',
regPhoto: '&#x1F4F7; Загрузи своё фото — так твой профиль будет красивее!'
};
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));