Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /** |
3 | | - * Create a group of checkboxes for licenses. N.b. the licenses are named after the templates they invoke. |
| 3 | + * Create a group of radio buttons for licenses. N.b. the licenses are named after the templates they invoke. |
4 | 4 | * @param div |
5 | 5 | * @param values (optional) array of license key names to activate by default |
6 | 6 | */ |
— | — | @@ -17,16 +17,16 @@ |
18 | 18 | _this.$selector = $j( selector ); |
19 | 19 | _this.$selector.append( $j( '<div class="mwe-error"></div>' ) ); |
20 | 20 | |
| 21 | + var name = 'license' + widgetCount; |
| 22 | + |
21 | 23 | $j.each( mw.UploadWizard.config[ 'licenses' ], function( i, licenseConfig ) { |
22 | 24 | var template = licenseConfig.template; |
23 | 25 | var messageKey = licenseConfig.messageKey; |
24 | | - |
25 | | - var name = 'license_' + template; |
26 | | - var id = 'licenseInput' + widgetCount + '_' + name; |
27 | | - var $input = $j( '<input />' ) |
28 | | - .attr( { id: id, name: name, type: 'checkbox', value: template } ) |
29 | | - // we use the selector because events can't be unbound unless they're in the DOM. |
30 | | - .click( function() { _this.$selector.trigger( 'changeLicenses' ); } ); |
| 26 | + |
| 27 | + var id = name + template; |
| 28 | + // IE6 is idiotic about radio buttons; you have to create them as HTML or clicks aren't recorded |
| 29 | + var $input = $j( '<input id="' + id + '" name="' + name + '" type="radio" value="' + template + '"/>' ); |
| 30 | + $input.click( function() { _this.$selector.trigger( 'changeLicenses' ); } ); |
31 | 31 | _this.inputs.push( $input ); |
32 | 32 | _this.$selector.append( |
33 | 33 | $input, |