Comparing the buttons on the mysite.com/cart and mysite.com/cart/checkout pages, it looks like the bootstrap theme is stripping out the wrapper around the buttons. For example here is the difference between Bartik and Bootstrap for the /cart page:

Bootstrap:

<a href="/">Continue shopping</a>
<button class="btn btn-info form-submit" id="edit-update" name="update-cart" value="Update cart" type="submit">Update cart</button>
<button class="btn btn-default form-submit" id="edit-checkout--2" name="op" value="Checkout" type="submit">Checkout</button>

Bartik:

<div class="form-actions form-wrapper" id="edit-actions">
<a href="/">Continue shopping</a>
<input type="submit" id="edit-update" name="update-cart" value="Update cart" class="form-submit">
<input type="submit" id="edit-checkout--2" name="op" value="Checkout" class="form-submit">
</div>

The div wrapping the anchor tag and the buttons does not appear in the bootstrap theme.

I also attached a comparative screen shot.

Bonus question: I'm curious about where the extra bootstrap classes are coming from in the bootstrap theme. How is the "btn-info" and "btn-default" applied?

Thanks for any help! :)

CommentFileSizeAuthor
ubercart_theme_compare.jpg510.72 KBmgladding

Comments

markhalliwell’s picture

Title: Bootstrap 3 theme and Ubercart shopping cart buttons » Form action wrapper being removed entirely

Hmm, the form actions are usually removed as it adds a lot of bulk otherwise. You can see it here in bootstrap_form_alter(). Not entirely sure what we should probably do here, maybe just remove the class somehow so it doesn't get themed? You can see above that we're whitelisting some formIDs, but I really don't like this approach TBH. Let me think about this more.

Answer to your bonus question:
It's coming from ./theme/system/button.vars.php which calls _bootstrap_colorize_button().

markhalliwell’s picture

Status: Active » Fixed

I think this was implemented in 7.x-2.x because there is a well attached to the specific form actions. Since we're not doing that, there's no need to to remove the theme wrapper.

Committed 1df0edf to 7.x-3.x:

Issue #2169055 by Mark Carver | mgladding: Form action wrapper being removed entirely.

Status: Fixed » Closed (fixed)

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

  • Commit 1df0edf on 7.x-3.x, 8.x-3.x by Mark Carver:
    Issue #2169055 by Mark Carver | mgladding: Form action wrapper being...
ryan.armstrong’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Assigned: Unassigned » ryan.armstrong
Status: Closed (fixed) » Needs review

Moving this to the 8.x-3.x branch as it has been committed to that branch. Making sure the fix gets tested in the Drupal 8 release.

  • Mark Carver committed 1df0edf on 8.x-3.x.x
    Issue #2169055 by Mark Carver | mgladding: Form action wrapper being...
markhalliwell’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Assigned: ryan.armstrong » Unassigned
Status: Needs review » Closed (fixed)

I'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.