Themes like Bootstrap (https://drupal.org/project/bootstrap) breaks VSF functionality. "Choose file" button is missing because Bootstrap theme use <button> tag instead of <input>.

Is there a way to attach "Choose file" button with markup, not with javascript? Or modify js files to make VSF works with Bootstrap theme out of the box.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rudiedirkx’s picture

Issue summary: View changes
rudiedirkx’s picture

I don't use Bootstrap. Gimme a patch or tell me what to change, exactly.

(Same issue as #2153303: Element agnostic selection of submit button (another project): theme agnostic button selection.)

rudiedirkx’s picture

I also get these when I enable bootstrap:

Notice: Undefined index: #type in bootstrap_file_widget() (line 16 of /var/www/quadrupal7/sites/default/themes/bootstrap/theme/file/file-widget.func.php).

Wasn't me!

When I fix this, it looks like shit, because Bootstrap changes everything. And it still doesn't work, because Bootstrap breaks something else. Some JS error in the modal/dialog/popup, because bootstrap overrides scroll by anchor (wtf seriously?).

So what I've done instead is add a variable that you can change to anything you want to select the submit button: visual_select_file_submit_button_selector. Its default value is input[type="submit"].

It's in dev.

I'll create a new release later. Lucky.

rudiedirkx’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

JordiTR made their first commit to this issue’s fork.