Fix #1460 : Select all value is included in the form, trigging an server side error

This commit is contained in:
Romain Neutron
2013-09-10 12:58:37 +02:00
parent e8bf678fc2
commit abbff72233

View File

@@ -28,6 +28,7 @@ define([
buttonClass: 'btn btn-inverse',
maxHeight: 185,
includeSelectAllOption: true,
selectAllValue: 'all',
selectAllText: i18n.t("all_collections"),
buttonText: function(options, select) {
if (options.length === 0) {
@@ -41,6 +42,10 @@ define([
}
}
});
$('form[name="registerForm"]').on('submit', function () {
// must deselect the "select all" checkbox for server side validation.
$("select[multiple='multiple']").multiselect('deselect', 'all');
});
};
return {