Skip to content

Commit

Permalink
MDL-83713 form: Fix javascript selector on file picker
Browse files Browse the repository at this point in the history
  • Loading branch information
jboulen committed Nov 25, 2024
1 parent 505a85e commit 56b3d27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ if (typeof M.form.dependencyManager === 'undefined') {
}
if (this.getAttribute('class').toLowerCase() == 'filepickerhidden') {
// Check for filepicker status.
var elementname = this.getAttribute('name');
if (elementname && M.form_filepicker.instances[elementname].fileadded) {
var elementid = this.getAttribute('id');
if (elementid && M.form_filepicker.instances[elementid].fileadded) {
lock = false;
} else {
lock = true;
Expand Down Expand Up @@ -553,8 +553,8 @@ if (typeof M.form.dependencyManager === 'undefined') {
}
if (this.getAttribute('class').toLowerCase() == 'filepickerhidden') {
// Check for filepicker status.
var elementname = this.getAttribute('name');
if (elementname && M.form_filepicker.instances[elementname].fileadded) {
var elementid = this.getAttribute('id');
if (elementid && M.form_filepicker.instances[elementid].fileadded) {
lock = false;
} else {
lock = true;
Expand Down Expand Up @@ -617,8 +617,8 @@ if (typeof M.form.dependencyManager === 'undefined') {
}
// Check for filepicker status.
if (this.getAttribute('class').toLowerCase() == 'filepickerhidden') {
var elementname = this.getAttribute('name');
if (elementname && M.form_filepicker.instances[elementname].fileadded) {
var elementid = this.getAttribute('id');
if (elementid && M.form_filepicker.instances[elementid].fileadded) {
lock = true;
} else {
lock = false;
Expand Down

0 comments on commit 56b3d27

Please sign in to comment.