Commit 7757237c authored by Ruslan Kabalin's avatar Ruslan Kabalin Committed by Sam Hemelryk
Browse files

MDL-29692 enrol: cohort: Fix default role issue in Chrome

This is related to MDL-24280, the issue still persists in Chrome. The patch
fixes it for Chrome and works fine for the most major browsers.
parent 3070626a
......@@ -122,11 +122,7 @@ YUI.add('moodle-enrol_cohort-quickenrolment', function(Y) {
break;
case 'defaultcohortroleloaded':
defaultrole = this.get(DEFAULTCOHORTROLE);
panel.get('contentBox').one('.'+CSS.PANELROLES).all('option').each(function(){
if (this.get('value')==defaultrole) {
this.setAttribute('selected', true);
}
});
panel.get('contentBox').one('.'+CSS.PANELROLES+' select').set('value', defaultrole);
break;
}
},
......@@ -339,4 +335,4 @@ YUI.add('moodle-enrol_cohort-quickenrolment', function(Y) {
}
}
}, '@VERSION@', {requires:['base','node', 'overlay', 'io-base', 'test', 'json-parse', 'event-delegate', 'dd-plugin', 'event-key', 'moodle-enrol-notification']});
\ No newline at end of file
}, '@VERSION@', {requires:['base','node', 'overlay', 'io-base', 'test', 'json-parse', 'event-delegate', 'dd-plugin', 'event-key', 'moodle-enrol-notification']});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment