MINOR Don't allow page type selection in add form when radio button is disabled

This commit is contained in:
Ingo Schommer 2012-01-06 16:54:16 +01:00
parent 14d3dea87c
commit 9d1822e7c6

View File

@ -69,10 +69,11 @@
this.setSelected(true); this.setSelected(true);
}, },
setSelected: function(bool) { setSelected: function(bool) {
var input = this.find('input');
this.toggleClass('selected', bool); this.toggleClass('selected', bool);
if(bool) { if(bool && !input.is(':disabled')) {
this.siblings().setSelected(false); this.siblings().setSelected(false);
this.find('input').attr('checked', 'checked'); input.attr('checked', 'checked');
} }
}, },
setEnabled: function(bool) { setEnabled: function(bool) {