From 6629c7e53cbe43016451cdb191ef2b7581cff134 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 14 Feb 2019 14:08:28 +0300 Subject: Ability set number of players for team events manually --- http/pkle2018.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/http/pkle2018.php b/http/pkle2018.php index 5e7e9e1..b4721ba 100644 --- a/http/pkle2018.php +++ b/http/pkle2018.php @@ -296,13 +296,12 @@ function valiuc(x,y){ } } } - if( y==3 ){ - var z = document.getElementById('izw'); - if( valiuc(z,2) ){ + if( y>=2 ){ + if (y==2) x = document.getElementById("swk"); + var z = document.getElementById('izw'); var srednieWk = x.value/z.value; if(srednieWk < 0.15) srednieWk = 0.15; document.getElementById('srd').value = srednieWk; - } } return true; } else { @@ -320,6 +319,7 @@ function typtur(x){ if( t.value!=null && t.value!='' && isFinite(t.value) ){ z.value = x * t.value; } + document.getElementById('izw').readOnly = (x < 4); } function submitit(){ @@ -465,7 +465,7 @@ function submitit(){ W zależności od typu
ilość indywidualistów,
par lub teamów
ZAWODNIKÓW
0 ){echo ' value="'.$izw.'"';}?>>
- To pole jest wyliczane
automatycznie.
+To pole jest wyliczane
automatycznie, ale możesz poprawić je
dla teamów nieczterosobowoych.
SUMA WK
0 ){echo ' value="'.$swk.'"';}?>>
Suma WK wszystkich
zawodników.
-- cgit v1.2.3