- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
//Флаг установки поля "дальше"
var AgreeRes = function () {
var res = true,
people_count = $('.bookingPassengersTitle').length,
pcount = 6,
$pa = $('.required.passport_term.checkPassportData.valid'),
$pas = $('.required.passposrt_num.valid') ,
$male = $('.male.required.valid'),
$ch = $('.required.birth_date.checkBirth.valid') ,
$nam = $('.required.first_name.valid'),
$name = $('.required.sec_name.valid');
var button_count = 0 +
$pa.length +
$pas.length +
$male.length +
$ch.length +
$nam.length +
$name.length;
res = button_count == people_count * pcount || button_count == 0;
if ( $('.required.passport_term.checkPassportData.valid, ' +
'.required.passposrt_num.valid, ' +
'.male.required.valid, ' +
'.required.birth_date.checkBirth.valid, ' +
'.required.first_name.valid, ' +
'.required.sec_name.valid').length > 0 ) {
if (res == false
|| $pa.val().trim().toString() === ""
|| $pas.val().trim().toString() === ""
|| $male.val().trim().toString() === ""
|| $ch.val().trim().toString() === ""
|| $nam.val().trim().toString() === ""
|| $name.val().trim().toString() === "") {
res = false;
}
}
return res;
}
Комментарии (0) RSS
Добавить комментарий