Closed (fixed)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2014 at 23:32 UTC
Updated:
30 Jul 2014 at 05:55 UTC
Jump to comment: Most recent
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! :)
| Comment | File | Size | Author |
|---|---|---|---|
| ubercart_theme_compare.jpg | 510.72 KB | mgladding |
Comments
Comment #1
markhalliwellHmm, 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().
Comment #2
markhalliwellI 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:
Comment #5
ryan.armstrong commentedMoving 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.
Comment #7
markhalliwellI'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.