v4 — дата рождения при регистрации

This commit is contained in:
Dauren777 2026-06-01 10:33:51 +00:00
parent d37012215b
commit 7e823e34dd

View File

@ -127,6 +127,7 @@ input[type=file]{display:none}
<div class="grid2">
<input type="text" id="regSport" placeholder="Вид спорта (плавание, бокс...)">
<input type="number" id="regAge" placeholder="Возраст" min="5" max="100">
<input type="date" id="regBirth" placeholder="Дата рождения">
</div>
<input type="text" id="regClub" placeholder="Клуб / спортивная школа">
<div class="grid2">
@ -335,6 +336,7 @@ function registerProfile() {
name,
sport: document.getElementById('regSport').value.trim(),
age: document.getElementById('regAge').value,
birth: document.getElementById('regBirth').value,
club: document.getElementById('regClub').value.trim(),
city: document.getElementById('regCity').value.trim(),
coach: document.getElementById('regCoach').value.trim(),
@ -348,7 +350,7 @@ function registerProfile() {
profiles.push(profile);
SS('profiles', profiles);
// Clear form
['regName','regSport','regAge','regClub','regCity','regCoach','regRank','regGoal'].forEach(id => document.getElementById(id).value = '');
['regName','regSport','regAge','regBirth','regClub','regCity','regCoach','regRank','regGoal'].forEach(id => document.getElementById(id).value = '');
document.getElementById('regPhotoPreview').style.display = 'none';
loginProfile(profile.id);
}
@ -402,7 +404,7 @@ function renderProfileList() {
<div class="av">${p.photo ? `<img src="${p.photo}">` : p.name.charAt(0).toUpperCase()}</div>
<div class="info">
<div class="name">${p.name}</div>
<div class="sport">${[p.sport, p.club, p.age ? p.age+' лет' : '', p.rank].filter(Boolean).join(' · ')}</div>
<div class="sport">${[p.sport, p.club, p.age ? p.age+' лет' : '', p.birth ? '&#x1F382; '+p.birth : '', p.rank].filter(Boolean).join(' · ')}</div>
</div>
<button class="btn danger small" style="flex-shrink:0" onclick="event.stopPropagation();deleteProfile(${p.id})">&#x1F5D1;</button>
</div>