2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00
This commit is contained in:
Faris Ansari 2018-04-02 22:37:56 +05:30
parent 2bf226f4c3
commit 80295d9f2a
2 changed files with 5 additions and 0 deletions

View File

@ -418,3 +418,7 @@ input[type=file] {
position: absolute; position: absolute;
z-index: -1; z-index: -1;
} }
.was-validated input[type=file]:invalid + button {
border-color: $red;
}

View File

@ -7,6 +7,7 @@ class FileControl extends BaseControl {
this.fileButton = frappe.ui.create('button', { this.fileButton = frappe.ui.create('button', {
className: 'btn btn-outline-secondary btn-block', className: 'btn btn-outline-secondary btn-block',
inside: this.getInputParent(), inside: this.getInputParent(),
type: 'button',
textContent: 'Choose a file...', textContent: 'Choose a file...',
onclick: () => { onclick: () => {
this.input.click(); this.input.click();