Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Currently, for the custom file upload widget, we are showing Browse label for placeholder and button. It seems Bootstrap changed implementation a bit here and we have a bug.
Proposed resolution
Adjust template definition and CSS according to the latest Bootstrap code.
Comment | File | Size | Author |
---|---|---|---|
#3 | duplicated-browse-labels-custom-file-upload-3099042-3.patch | 2.27 KB | pivica |
#3 | interdiff-3099042-2-3.txt | 1.04 KB | pivica |
Comments
Comment #2
pivica CreditAttribution: pivica at MD Systems GmbH commentedHere is a patch.
We decided to disable placeholder label text by default, because we already have main field label and 'Choose file...' and 'Browse' labels have the same meaning.
You can still enable showing of 'Choose file...' placeholder. Just define template variable `custom_file_label_show`. For more details check the documentation on https://www.drupal.org/docs/8/themes/bs-base/additional-features/custom-....
Comment #3
pivica CreditAttribution: pivica at MD Systems GmbH commentedInstead of a boolean flag, it's better to just have `custom_file_label` variable that you can define in preprocessor if needed. Removed some white spaces in a template.
Comment #5
pivica CreditAttribution: pivica at MD Systems GmbH commentedFixed white spaces problems. Committed.