Closed (fixed)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Templates
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2013 at 21:07 UTC
Updated:
3 May 2018 at 18:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
iaartguy commentedsettled on the following css line (anywhere) to deal with error messages and whatnot...
.form-managed-file { height: auto!important; }Haven't found a way to get the upload button on the same line as the file input (which seems to be the standard in a default drupal install). Don't like using the !important tag... but deadlines.
Comment #2
mdobossy commentedI ran into the same issue you are seeing. In my case, I am using the webform module. In the webform supplied CSS there is a rule:
.webform-container-inline div, .webform-container-inline div.form-item { display: inline }This is overriding bootstrap's rule on the .input-group wrapper of:
.input-group {display: table; }As a quick fix, I specified the id 'edit-submitted-' css with a display: table !important; which did the trick.
Comment #3
joelstein commentedHere's a patch which renders a Webform file component exactly like a regular managed file element, with the input field and Upload button as an input group.
Comment #4
markhalliwell@joelstein, I don't think this issue is about webform specifically, that should probably be a separate issue (and simply returning the output from bootstrap_file_managed_file, not duplicating the code).
Comment #5
joelstein commentedAh, okay. The code is not exactly the same, because Webform file fields can't have the element ID. But otherwise, it's close. I'll open a new issue and we can tackle it there.
Comment #6
markhalliwellWas this ever done, i.e. is this still an issue?
Comment #7
joelstein commentedMark, no, I'm sorry, I never created a follow-up issue. But fwiw, I've been using this patch for some time now on 100+ websites, and it works sweetly.
Comment #8
markhalliwellIdk why I said what I did in #4, after looking at the code in #3 again, this actually is specific to webform. No new issue needs to be created.
It may not be "exactly" the same, but we can add some custom variable before passing it to
bootstrap_file_managed_file()so it knows not to add the ID.Also, this is technically a feature request since it's supporting a 3rd party contrib module that creates custom elements (instead of using core's).
Maybe so, but I'd like to get this committed and not leave an open issue. If you could find some time to fix the above patch so what I mentioned above, I'll gladly commit it.
Comment #9
joelstein commentedHere you go. :)
Comment #10
markhalliwellPlease use bootstrap_include() here.
Comment #11
joelstein commentedHere you go! :)
Comment #13
markhalliwellComment #14
joelstein commentedThanks, friend!
Comment #15
markhalliwellCheers :D