Fixed #31404 -- Changed selector-chosen's multiple attribute to HTML5 boolean syntax.

This commit is contained in:
zriv 2020-03-26 09:53:39 +00:00 committed by Mariusz Felisiak
parent bec4dea844
commit b9336b78cf
3 changed files with 3 additions and 1 deletions

View File

@ -954,6 +954,7 @@ answer newbie questions, and generally made Django that much better:
zegor
Zeynel Özdemir <ozdemir.zynl@gmail.com>
Zlatko Mašek <zlatko.masek@gmail.com>
zriv <https://github.com/zriv>
<Please alphabetize new entries>
A big THANK YOU goes to:

View File

@ -95,7 +95,7 @@ Requires core.js and SelectBox.js.
)
);
var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.name);
var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', '', 'size', from_box.size, 'name', from_box.name);
to_box.className = 'filtered';
var clear_all = quickElement('a', selector_chosen, gettext('Remove all'), 'title', interpolate(gettext('Click to remove all chosen %s at once.'), [field_name]), 'href', '#', 'id', field_id + '_remove_all_link');
clear_all.className = 'selector-clearall';

View File

@ -15,6 +15,7 @@ QUnit.test('init', function(assert) {
$('.selector-available select').outerHeight() + $('.selector-filter').outerHeight(),
$('.selector-chosen select').height()
);
assert.equal($('.selector-chosen select')[0].getAttribute('multiple'), '');
assert.equal($('.selector-chooseall').text(), "Choose all");
assert.equal($('.selector-add').text(), "Choose");
assert.equal($('.selector-remove').text(), "Remove");