Skip to content

Commit

Permalink
RWD: Removed double span element from HTML buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Dec 12, 2024
1 parent c599549 commit 51ced00
Show file tree
Hide file tree
Showing 48 changed files with 64 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="additional-addtocart-box">
<?= $this->getChildHtml() ?>
</div>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" id="map-popup-button"><span><span><?= $this->__('Add to Cart') ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" id="map-popup-button"><?= $this->__('Add to Cart') ?></button>
</form>
</div>
<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'<?= $this->helper('catalog/product_compare')->getAddToCartUrlCustom($_item, false) ?>',
'<?= $_params ?>',
'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
<?php else: ?>
<p class="availability out-of-stock"><span><?= $this->__('Out of stock') ?></span></p>
Expand Down Expand Up @@ -139,7 +139,7 @@
'<?= $this->helper('catalog/product_compare')->getAddToCartUrlCustom($_item, false) ?>',
'<?= $_params ?>',
'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
</p>
<?php else: ?>
Expand All @@ -165,7 +165,7 @@
</tbody>
</table>
<div class="buttons-set">
<button type="button" title="<?= $this->quoteEscape($this->__('Close Window')) ?>" class="button" onclick="window.close();"><span><span><?= $this->__('Close Window') ?></span></span></button>
<button type="button" title="<?= $this->quoteEscape($this->__('Close Window')) ?>" class="button" onclick="window.close();"><?= $this->__('Close Window') ?></button>
<span class="please-wait" id="compare-list-please-wait" style="display:none;">
<img src="<?= $this->getSkinUrl('images/loading.svg') ?>" alt="<?= $this->quoteEscape($this->__('Please wait...')) ?>" title="<?= $this->quoteEscape($this->__('Please wait...')) ?>" class="v-middle" /> <?= $this->__('Please wait...') ?>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
<?php endforeach ?>
</ol>
<div class="actions">
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Compare')) ?>" class="button" onclick="popWin('<?= $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')"><span><span><?= $this->__('Compare') ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Compare')) ?>" class="button" onclick="popWin('<?= $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')"><?= $this->__('Compare') ?></button>
<a href="<?= $_helper->getClearListUrl() ?>" onclick="return confirm('<?= Mage::helper('core')->jsQuoteEscape($this->__('Are you sure you would like to remove all products from your comparison?')) ?>');"><?= $this->__('Clear All') ?></a>
</div>
<?php else: ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
title="<?= $this->quoteEscape($this->__('Add to Cart')) ?>"
class="button btn-cart"
onclick="customFormSubmit('<?= $_cartUrl ?>', '<?= $_params ?>', 'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
</p>
<?php elseif($_product->getStockItem() && $_product->getStockItem()->getIsInStock()): ?>
Expand Down Expand Up @@ -164,7 +164,7 @@
title="<?= $this->quoteEscape($this->__('Add to Cart')) ?>"
class="button btn-cart"
onclick="customFormSubmit('<?= $_cartUrl ?>', '<?= $_params ?>', 'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
<?php elseif($_product->getStockItem() && $_product->getStockItem()->getIsInStock()): ?>
<a title="<?= $this->quoteEscape($this->__('View Details')) ?>" class="button" href="<?= $_product->getProductUrl() ?>"><?= $this->__('View Details') ?></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<?php endif ?>
<div class="add-to-cart-buttons">
<button type="button" title="<?= $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?= $buttonTitle ?></span></span></button>
<button type="button" title="<?= $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?= $buttonTitle ?></button>
<?= $this->getChildHtml('', true, true) ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'<?= $this->getAddToCartUrlCustom($_product, [], false) ?>',
'<?= $_params ?>',
'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
<?php else: ?>
<p class="availability out-of-stock"><span><?= $this->__('Out of stock') ?></span></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?= $this->getReviewsSummaryHtml($_product, 'short') ?>
<?= $this->getPriceHtml($_product, true, '-widget-new-list') ?>
<?php if ($_product->isSaleable()): ?>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setLocation('<?= $this->getAddToCartUrl($_product) ?>')"><span><span><?= $this->__('Add to Cart') ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setLocation('<?= $this->getAddToCartUrl($_product) ?>')"><?= $this->__('Add to Cart') ?></button>
<?php else: ?>
<p class="availability out-of-stock"><span><?= $this->__('Out of stock') ?></span></p>
<?php endif ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</ul>
</div>
<div class="buttons-set">
<button type="submit" title="<?= Mage::helper('core')->quoteEscape($this->__('Search')) ?>" class="button"><span><span><?= $this->__('Search') ?></span></span></button>
<button type="submit" title="<?= Mage::helper('core')->quoteEscape($this->__('Search')) ?>" class="button"><?= $this->__('Search') ?></button>
</div>
</form>
<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $catalogSearchHelper = $this->helper('catalogsearch');
<div class="input-box">
<label for="search"><?= $this->__('Search:') ?></label>
<input id="search" type="search" name="<?= $catalogSearchHelper->getQueryParamName() ?>" value="<?= $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text required-entry" maxlength="<?= $catalogSearchHelper->getMaxQueryLength();?>" placeholder="<?= $this->quoteEscape($this->__('Search entire store here...')) ?>" />
<button type="submit" title="<?= $this->quoteEscape($this->__('Search')) ?>" class="button search-button"><span><span><?= $this->__('Search') ?></span></span></button>
<button type="submit" title="<?= $this->quoteEscape($this->__('Search')) ?>" class="button search-button"><?= $this->__('Search') ?></button>
</div>

<div id="search_autocomplete" class="search-autocomplete"></div>
Expand Down
8 changes: 4 additions & 4 deletions app/design/frontend/rwd/default/template/checkout/cart.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@
<td colspan="50" class="a-right cart-footer-actions">

<!-- Make this button the first responder rather than empty cart -->
<button type="submit" style="visibility:hidden;" data-cart-item-update name="update_cart_action" value="update_qty" title="<?= $this->quoteEscape($this->__('Update Shopping Cart')) ?>" class="button2 btn-update"><span><span><?= $this->__('Update Shopping Cart') ?></span></span></button>
<button type="submit" style="visibility:hidden;" data-cart-item-update name="update_cart_action" value="update_qty" title="<?= $this->quoteEscape($this->__('Update Shopping Cart')) ?>" class="button2 btn-update"><?= $this->__('Update Shopping Cart') ?></button>

<button type="submit" name="update_cart_action" data-cart-empty value="empty_cart" title="<?= $this->quoteEscape($this->__('Empty Cart')) ?>" class="button2 btn-empty" id="empty_cart_button"><span><span><?= $this->__('Empty Cart') ?></span></span></button>
<button type="submit" name="update_cart_action" data-cart-empty value="empty_cart" title="<?= $this->quoteEscape($this->__('Empty Cart')) ?>" class="button2 btn-empty" id="empty_cart_button"><?= $this->__('Empty Cart') ?></button>

<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?= $this->quoteEscape($this->__('Update Shopping Cart')) ?>" class="button2 btn-update"><span><span><?= $this->__('Update Shopping Cart') ?></span></span></button>
<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?= $this->quoteEscape($this->__('Update Shopping Cart')) ?>" class="button2 btn-update"><?= $this->__('Update Shopping Cart') ?></button>

<span class="or">-<?= $this->__('or') ?>-</span>

<?php if ($this->getContinueShoppingUrl()): ?>
<button type="button" title="<?= $this->quoteEscape($this->__('Continue Shopping')) ?>" class="button2 btn-continue" onclick="setLocation('<?= Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><span><span><?= $this->__('Continue Shopping') ?></span></span></button>
<button type="button" title="<?= $this->quoteEscape($this->__('Continue Shopping')) ?>" class="button2 btn-continue" onclick="setLocation('<?= Mage::helper('core')->quoteEscape($this->getContinueShoppingUrl()) ?>')"><?= $this->__('Continue Shopping') ?></button>
<?php endif ?>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<div class="field-wrapper">
<input class="input-text" type="text" id="coupon_code" name="coupon_code" value="<?= $this->escapeHtml($this->getCouponCode()) ?>" />
<div class="button-wrapper">
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Apply')) ?>" class="button2" onclick="discountForm.submit(false)" value="<?= $this->__('Apply') ?>"><span><span><?= $this->__('Apply') ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Apply')) ?>" class="button2" onclick="discountForm.submit(false)" value="<?= $this->__('Apply') ?>"><?= $this->__('Apply') ?></button>
<?php if(strlen($this->getCouponCode())): ?>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Cancel')) ?>" class="button2 cancel-coupon" onclick="discountForm.submit(true)" value="<?= $this->__('Cancel') ?>"><span><span><?= $this->__('Cancel') ?></span></span>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Cancel')) ?>" class="button2 cancel-coupon" onclick="discountForm.submit(true)" value="<?= $this->__('Cancel') ?>"><?= $this->__('Cancel') ?>
</button>
<?php endif ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'<?= $this->getAddToCartUrlCustom($_item, [], false) ?>',
'<?= $_params ?>',
'post')">
<span><span><?= $this->__('Add to Cart') ?></span></span>
<?= $this->__('Add to Cart') ?>
</button>
<ul class="add-to-links">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
<?php endif ?>
<div class="add-to-cart-buttons">
<button type="button" title="<?= Mage::helper('core')->quoteEscape($buttonTitle) ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?= $buttonTitle ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($buttonTitle) ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?= $buttonTitle ?></button>
<?= $this->getChildHtml('', true, true) ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ $_deleteUrl = $this->getDeleteUrlCustom(false);
data-cart-item-id="<?= $this->jsQuoteEscape($_item->getSku()) ?>"
title="<?= Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" maxlength="12" />

<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?= Mage::helper('core')->quoteEscape($this->__('Update')) ?>" class="button btn-update"><span><span><?= $this->__('Update') ?></span></span>
<button type="submit" name="update_cart_action" data-cart-item-update value="update_qty" title="<?= Mage::helper('core')->quoteEscape($this->__('Update')) ?>" class="button btn-update"><?= $this->__('Update') ?>
</button>

<ul class="cart-links">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ul>
<div class="buttons-set">
<button type="button" title="<?= $this->quoteEscape($this->__('Estimate')) ?>" onclick="coShippingMethodForm.submit()" class="button2">
<span><span><?= $this->__('Estimate') ?></span></span>
<?= $this->__('Estimate') ?>
</button>
</div>
</form>
Expand Down Expand Up @@ -99,7 +99,7 @@
</dl>
<div class="buttons-set">
<button type="submit" title="<?= $this->quoteEscape($this->__('Update Total')) ?>" class="button" name="do" value="<?= $this->__('Update Total') ?>">
<span><span><?= $this->__('Update Total') ?></span></span>
<?= $this->__('Update Total') ?>
</button>
</div>
<?= $this->getBlockHtml('formkey') ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
<div class="actions">
<?= $this->getChildHtml('extra_actions') ?>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Checkout')) ?>" class="button" onclick="setLocation('<?= $this->getCheckoutUrl() ?>')"><span><span><?= $this->__('Checkout') ?></span></span></button>
<button type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Checkout')) ?>" class="button" onclick="setLocation('<?= $this->getCheckoutUrl() ?>')"><?= $this->__('Checkout') ?></button>
</div>
<?php endif ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="multiple-checkout">
<div class="page-title title-buttons">
<h1><?= $this->__('Ship to Multiple Addresses') ?></h1>
<button data-action="add-new-customer-address" type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Enter a New Address')) ?>" class="button" onclick="$('add_new_address_flag').value=1; $('checkout_multishipping_form').submit();"><span><span><?= $this->__('Enter a New Address') ?></span></span></button>
<button data-action="add-new-customer-address" type="button" title="<?= Mage::helper('core')->quoteEscape($this->__('Enter a New Address')) ?>" class="button" onclick="$('add_new_address_flag').value=1; $('checkout_multishipping_form').submit();"><?= $this->__('Enter a New Address') ?></button>
</div>
<input type="hidden" name="continue" value="0" id="can_continue_flag" />
<input type="hidden" name="new_address" value="0" id="add_new_address_flag" />
Expand All @@ -47,7 +47,7 @@
<button type="submit" title="<?= Mage::helper('core')->quoteEscape($this->__('Update Qty &amp; Addresses')) ?>"
class="button" onclick="$('can_continue_flag').value=0"
data-multiship-item-update>
<span><span><?= $this->__('Update Qty &amp; Addresses') ?></span></span>
<?= $this->__('Update Qty &amp; Addresses') ?>
</button>
</td>
</tr>
Expand All @@ -67,7 +67,7 @@
</table>
<div class="buttons-set">
<p class="back-link"><a href="<?= $this->getBackUrl() ?>"><small>&laquo; </small><?= $this->__('Back to Shopping Cart') ?></a></p>
<button type="submit" data-action="checkout-continue-shipping" title="<?= Mage::helper('core')->quoteEscape($this->__('Continue to Shipping Information')) ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif ?>" onclick="$('can_continue_flag').value=1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif ?>><span><span><?= $this->__('Continue to Shipping Information') ?></span></span></button>
<button type="submit" data-action="checkout-continue-shipping" title="<?= Mage::helper('core')->quoteEscape($this->__('Continue to Shipping Information')) ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif ?>" onclick="$('can_continue_flag').value=1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif ?>><?= $this->__('Continue to Shipping Information') ?></button>
</div>
</div>
<?= $this->getBlockHtml('formkey') ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>
<div class="buttons-set">
<p class="back-link"><a href="<?= $this->getBackUrl() ?>"><small>&laquo; </small><?= $this->__('Back to Shipping Information') ?></a></p>
<button id="payment-continue" type="submit" title="<?= Mage::helper('core')->quoteEscape($this->__('Continue to Review Your Order')) ?>" class="button"><span><span><?= $this->__('Continue to Review Your Order') ?></span></span></button>
<button id="payment-continue" type="submit" title="<?= Mage::helper('core')->quoteEscape($this->__('Continue to Review Your Order')) ?>" class="button"><?= $this->__('Continue to Review Your Order') ?></button>
</div>
<?= $this->getBlockHtml('formkey') ?>
</form>
Expand Down
Loading

0 comments on commit 51ced00

Please sign in to comment.