|
|
|
@ -104,6 +104,19 @@ describe('yii.activeForm', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('if at least one of the items is disabled', function () { |
|
|
|
|
it('validate radioList', function () { |
|
|
|
|
$activeForm = $('#w2'); |
|
|
|
|
$activeForm.yiiActiveForm({ |
|
|
|
|
id: 'radioList', |
|
|
|
|
input: '#radioList' |
|
|
|
|
}); |
|
|
|
|
$activeForm.yiiActiveForm('validate'); |
|
|
|
|
|
|
|
|
|
assert.isFalse($activeForm.data('yiiActiveForm').validated); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('resetForm method', function () { |
|
|
|
@ -228,12 +241,12 @@ describe('yii.activeForm', function () {
|
|
|
|
|
$input = $('#' + inputId); |
|
|
|
|
|
|
|
|
|
$activeForm = $('#w0'); |
|
|
|
|
$activeForm.yiiActiveForm( |
|
|
|
|
[{ |
|
|
|
|
"id": inputId, |
|
|
|
|
"name": "name", |
|
|
|
|
input: '#' + inputId |
|
|
|
|
}], []).on('afterValidate', afterValidateSpy); |
|
|
|
|
$activeForm.yiiActiveForm( |
|
|
|
|
[{ |
|
|
|
|
"id": inputId, |
|
|
|
|
"name": "name", |
|
|
|
|
input: '#' + inputId |
|
|
|
|
}], []).on('afterValidate', afterValidateSpy); |
|
|
|
|
|
|
|
|
|
$activeForm.yiiActiveForm('validate'); |
|
|
|
|
assert.notEqual(null, eventData); |
|
|
|
|