diff --git a/client/style/style.scss b/client/style/style.scss index 046acbf8..cf9761e0 100644 --- a/client/style/style.scss +++ b/client/style/style.scss @@ -418,3 +418,7 @@ input[type=file] { position: absolute; z-index: -1; } + +.was-validated input[type=file]:invalid + button { + border-color: $red; +} diff --git a/client/view/controls/file.js b/client/view/controls/file.js index e26a6984..8cc6dd82 100644 --- a/client/view/controls/file.js +++ b/client/view/controls/file.js @@ -7,6 +7,7 @@ class FileControl extends BaseControl { this.fileButton = frappe.ui.create('button', { className: 'btn btn-outline-secondary btn-block', inside: this.getInputParent(), + type: 'button', textContent: 'Choose a file...', onclick: () => { this.input.click();