osb/resources/assets/js/components/auth/InitializeIcheck.js
2018-04-10 21:35:29 +10:00

21 lines
525 B
JavaScript
Vendored

export default {
mounted () {
this.initialitzeICheck()
},
methods: {
initialitzeICheck () {
var component = this
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%'
}).on('ifChecked', function (event) {
component.form.setField('terms', true)
component.form.errors.clear('terms')
}).on('ifUnchecked', function (event) {
component.form.setField('terms', '')
})
}
}
}