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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pivica created an issue. See original summary.

pivica’s picture

Status: Active » Needs review
FileSize
2.04 KB

Here 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-....

pivica’s picture

Instead 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.

  • pivica committed b9b84d7 on 8.x-1.x
    Issue #3099042 by pivica: Fix duplicated Browse label for custom file...
pivica’s picture

Status: Needs review » Fixed

Fixed white spaces problems. Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.