Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Restyle checkout and replace primary btn class

dominik-zeglenba31c3bb541e
diff --git a/saleor/static/js/components/variantPicker/VariantPicker.js b/saleor/static/js/components/variantPicker/VariantPicker.js
index 7381175bd3..70e5545253 100644
--- a/saleor/static/js/components/variantPicker/VariantPicker.js
+++ b/saleor/static/js/components/variantPicker/VariantPicker.js
@@ -139,7 +139,7 @@ export default observer(class VariantPicker extends Component {
const disableAddToCart = store.isEmpty || !this.checkVariantAvailability();
const addToCartBtnClasses = classNames({
- 'btn primary': true,
+ 'btn btn-primary': true,
'disabled': disableAddToCart
});
diff --git a/saleor/static/scss/components/_buttons.scss b/saleor/static/scss/components/_buttons.scss
index 2c0873067a..d16c7b31f3 100644
--- a/saleor/static/scss/components/_buttons.scss
+++ b/saleor/static/scss/components/_buttons.scss
@@ -24,31 +24,23 @@ a.btn {
}
}
&-primary {
- border-color: transparent;
+ border: none;
color: $white;
+ padding: $global-padding $global-padding * 4;
&:hover {
background-color: #42beab;
- border-color: transparent;
+ border: none;
color: $white;
}
}
- &.primary {
- background-color: $blue;
- color: $white;
- padding: $global-padding $global-padding * 4;
- border: none;
- &:hover {
- background-color: $darken-blue;
- }
- }
&.secondary {
- border: 1px solid $blue;
+ border: 1px solid $light-turquoise;
padding: $global-padding $global-padding * 2;
background-color: $white;
- color: $blue;
+ color: $light-turquoise;
&:hover {
- border-color: $darken-blue;
- color: $darken-blue;
+ border-color: #42beab;
+ color: #42beab;
}
}
&.danger {
diff --git a/saleor/static/scss/components/_cards.scss b/saleor/static/scss/components/_cards.scss
index 2be255f900..8081538fb7 100644
--- a/saleor/static/scss/components/_cards.scss
+++ b/saleor/static/scss/components/_cards.scss
@@ -28,7 +28,7 @@
float: right;
cursor: pointer;
}
- svg:hover path{
+ svg:hover path {
fill: $darken-blue;
}
}
@@ -56,3 +56,9 @@
}
}
}
+
+.card {
+ &-default {
+ background-color: $light-gray;
+ }
+}
diff --git a/saleor/static/scss/components/_forms.scss b/saleor/static/scss/components/_forms.scss
index 2d8e95e0e5..df02e745b1 100644
--- a/saleor/static/scss/components/_forms.scss
+++ b/saleor/static/scss/components/_forms.scss
@@ -59,6 +59,8 @@ input {
top: 0;
right: 0;
margin-top: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
}
}
@@ -169,9 +171,27 @@ input#id_quantity {
padding-left: 0;
}
input {
+ -webkit-appearance: none;
+ cursor: pointer;
+ border: 1px solid $light-turquoise;
display: inline-block;
- vertical-align: top;
+ height: 14px;
margin: $global-margin / 4 $global-margin / 2 0 0;
+ position: relative;
+ vertical-align: top;
+ width: 14px;
+ &:checked {
+ &:after {
+ background: $light-turquoise;
+ border-radius: 100%;
+ content: "";
+ height: 8px;
+ left: 2px;
+ position: absolute;
+ top: 2px;
+ width: 8px;
+ }
+ }
}
span,
.address-details {
diff --git a/saleor/static/scss/components/_header.scss b/saleor/static/scss/components/_header.scss
index 2c42e28ecc..1acb750730 100644
--- a/saleor/static/scss/components/_header.scss
+++ b/saleor/static/scss/components/_header.scss
@@ -204,6 +204,9 @@
margin-left: 10px;
vertical-align: middle;
}
+ .btn {
+ padding: $global-padding;
+ }
}
.mobile-search-icon {
float: right;
diff --git a/saleor/static/scss/layouts/_checkout.scss b/saleor/static/scss/layouts/_checkout.scss
index 5dc2c5be51..7152e09ded 100644
--- a/saleor/static/scss/layouts/_checkout.scss
+++ b/saleor/static/scss/layouts/_checkout.scss
@@ -1,6 +1,7 @@
.checkout {
margin-bottom: $global-margin * 5;
- h2, h3 {
+ h2,
+ h3 {
text-transform: uppercase;
margin: 0 0 $global-margin * 2 0;
}
@@ -18,7 +19,7 @@
padding: $global-padding * 1.5 0 $global-padding;
margin-bottom: $global-margin;
@include media-breakpoint-down(sm) {
- padding: $global-padding 0;
+ padding: $global-padding 0;
& ~ .maincontent {
margin-top: 0;
}
@@ -86,10 +87,20 @@
border-top: 1px solid $gray;
padding-top: $global-padding;
.input-btn {
- .btn-voucher-remove {
- position: relative;
- }
+ input {
+ border-radius: 12px;
+ }
+ .btn {
+ height: 3.6rem;
+ padding: $global-padding;
+ }
+ .btn-voucher-remove {
+ position: relative;
}
+ }
+ input {
+ padding: $global-padding;
+ }
}
&__tittle {
margin-bottom: $global-margin * 2;
@@ -146,6 +157,38 @@
}
}
}
+ &__new-address {
+ grid-column-end: span 2;
+ &-container {
+ grid-column-end: span 2;
+ }
+ }
+ &__shipping {
+ .btn {
+ grid-column-start: 2;
+ width: 100%;
+ }
+ }
+ &__shipping-methods {
+ .address {
+ width: calc(50% - #{$global-margin});
+ }
+ .btn {
+ grid-column-start: 2;
+ width: 100%;
+ }
+ &-form {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ grid-column-gap: $global-margin * 2;
+ grid-row-gap: $global-margin;
+ label {
+ cursor: pointer;
+ display: block;
+ margin: 0;
+ }
+ }
+ }
&__payments {
&-card-expiry-slash {
pointer-events: none;
@@ -156,4 +199,16 @@
&__street_address_2 {
padding-top: $global-padding * 2;
}
+ &__addresses {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ grid-column-gap: $global-margin * 2;
+ &-panel {
+ label {
+ cursor: pointer;
+ display: block;
+ margin-right: 0;
+ }
+ }
+ }
}
diff --git a/templates/_language_picker_modal.html b/templates/_language_picker_modal.html
index f27e44e2d4..923629daf5 100644
--- a/templates/_language_picker_modal.html
+++ b/templates/_language_picker_modal.html
@@ -22,7 +22,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" context "Close modal action button" %}</button>
- <button type="submit" id="language-picker-btn" class="btn primary narrow">{% trans "Change" context "Change language action button" %}</button>
+ <button type="submit" id="language-picker-btn" class="btn btn-primary narrow">{% trans "Change" context "Change language action button" %}</button>
</div>
</form>
</div>
diff --git a/templates/account/address_edit.html b/templates/account/address_edit.html
index 4dc6337ed4..e84300a6dd 100644
--- a/templates/account/address_edit.html
+++ b/templates/account/address_edit.html
@@ -53,7 +53,7 @@
{% include "account/snippets/address_form.html" %}
</div>
<p class="text-right">
- <button type="submit" class="btn primary narrow">
+ <button type="submit" class="btn btn-primary narrow">
{% trans "Save changes" context "Edit/new address primary action" %}
</button>
</p>
diff --git a/templates/account/details.html b/templates/account/details.html
index 5509232630..ebda9815b0 100644
--- a/templates/account/details.html
+++ b/templates/account/details.html
@@ -115,7 +115,7 @@
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form change_password_form %}
- <input type="submit" class="btn primary narrow" value="{% trans "Change password" context "User profile action" %}">
+ <input type="submit" class="btn btn-primary narrow" value="{% trans "Change password" context "User profile action" %}">
</form>
</div>
</div>
@@ -129,7 +129,7 @@
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form user_name_form %}
- <input type="submit" class="btn primary narrow" value="{% trans "Update" context "User profile action" %}">
+ <input type="submit" class="btn btn-primary narrow" value="{% trans "Update" context "User profile action" %}">
</form>
</div>
</div>
diff --git a/templates/account/partials/login_form.html b/templates/account/partials/login_form.html
index 309ff826f9..2e51a6e77c 100644
--- a/templates/account/partials/login_form.html
+++ b/templates/account/partials/login_form.html
@@ -12,7 +12,7 @@
</fieldset>
<div class="row login__btn-group">
<div class="col-sm-12">
- <button class="btn primary narrow">
+ <button class="btn btn-primary narrow">
{% trans "Log in" context "Login form primary action" %}
</button>
<a rel="nofollow" class="link--styled" href="{% url 'account:reset-password' %}">
diff --git a/templates/account/password_change.html b/templates/account/password_change.html
index 737cfaf95b..2b762e7717 100644
--- a/templates/account/password_change.html
+++ b/templates/account/password_change.html
@@ -24,7 +24,7 @@
{% bootstrap_form form %}
<input type="hidden" name="next" value="{{ next }}" />
</fieldset>
- <button class="btn primary">
+ <button class="btn btn-primary">
{% trans "Save new password" context "Password change form primary action" %}
</button>
</form>
diff --git a/templates/account/password_reset.html b/templates/account/password_reset.html
index baa13b70b8..6c32e0db0a 100644
--- a/templates/account/password_reset.html
+++ b/templates/account/password_reset.html
@@ -26,7 +26,7 @@
</fieldset>
<div class="row login__btn-group">
<div class="col-12">
- <button class="btn primary narrow">
+ <button class="btn btn-primary narrow">
{% trans "Continue" context "Password reset primary action" %}
</button>
<img class="lazyload lazypreload" data-src="{% static "images/reset-bg.png" %}" />
diff --git a/templates/account/password_reset_from_key.html b/templates/account/password_reset_from_key.html
index 0a3d46fe4c..5049d4969b 100644
--- a/templates/account/password_reset_from_key.html
+++ b/templates/account/password_reset_from_key.html
@@ -28,7 +28,7 @@
</fieldset>
<div class="row login__btn-group">
<div class="col-sm-12">
- <button class="btn primary narrow">
+ <button class="btn btn-primary narrow">
{% trans "Continue" context "Password reset from key form primary action" %}
</button>
<img class="lazyload lazypreload" data-src="{% static "images/reset-bg.png" %}" />
diff --git a/templates/account/signup.html b/templates/account/signup.html
index 79e7896637..44bf1571b4 100644
--- a/templates/account/signup.html
+++ b/templates/account/signup.html
@@ -32,7 +32,7 @@
<input type="hidden" name="{{ REDIRECT_FIELD_NAME }}" value="{{ REDIRECT_FIELD_VALUE }}"/>
{% endif %}
</fieldset>
- <button type="submit" class="btn primary narrow">
+ <button type="submit" class="btn btn-primary narrow">
{% trans "Create an account" context "Signup form primary action" %}
</button>
</form>
diff --git a/templates/cart_dropdown.html b/templates/cart_dropdown.html
index 300bdb9d03..98427880e0 100644
--- a/templates/cart_dropdown.html
+++ b/templates/cart_dropdown.html
@@ -54,7 +54,7 @@
<a href="{% url "cart:index" %}" class="btn secondary narrow float-md-right">{% trans "Go to cart" context "Cart dropdown secondary action" %}</a>
</div>
<div class="col-md-5">
- <a href="{% url "checkout:login" %}" class="btn primary narrow float-md-right">{% trans "Checkout" context "Cart dropdown primary action" %}</a>
+ <a href="{% url "checkout:login" %}" class="btn btn-primary narrow float-md-right">{% trans "Checkout" context "Cart dropdown primary action" %}</a>
</div>
</div>
{% else %}
@@ -64,7 +64,7 @@
data-srcset="{% static 'images/empty-cart-bg.png' %} 1x, {% static 'images/empty-cart-bg2x.png' %} 2x"
src="{% placeholder size=255 %}"
class="lazyload lazypreload">
- <a href="{% url 'home' %}" class="btn primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
+ <a href="{% url 'home' %}" class="btn btn-primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
</div>
{% endif %}
</div>
diff --git a/templates/checkout/index.html b/templates/checkout/index.html
index 2ca72eb5cf..d17dd612a1 100644
--- a/templates/checkout/index.html
+++ b/templates/checkout/index.html
@@ -77,7 +77,7 @@
</div>
<div class="row">
<div class="col-md-12">
- <a href="{% url "checkout:login" %}" class="btn primary float-right cart__submit">
+ <a href="{% url "checkout:login" %}" class="btn btn-primary float-right cart__submit">
{% trans "Checkout" context "Cart primary action" %}
</a>
<button class="btn secondary float-right cart__clear" data-action="{% url 'cart:clear-cart' %}">
@@ -89,7 +89,7 @@
<div class="cart__empty">
<img class="lazyload lazypreload" data-src="{% static 'images/empty-cart-bg.png' %}" data-srcset="{% static 'images/empty-cart-bg.png' %} 1x, {% static 'images/empty-cart-bg2x.png' %} 2x">
<h2>{% trans "There are no products in your shopping cart." context "Empty cart message" %}</h2>
- <a href="{% url 'home' %}" class="btn primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
+ <a href="{% url 'home' %}" class="btn btn-primary">{% trans "Check out our sales" context "Empty cart link" %}</a>
</div>
{% endif %}
</div>
diff --git a/templates/checkout/payment.html b/templates/checkout/payment.html
index 0d0f04bc6f..6fa8ef226e 100644
--- a/templates/checkout/payment.html
+++ b/templates/checkout/payment.html
@@ -9,7 +9,7 @@
<h1>{% trans "Payment" context "Checkout payment title" %}</h1>
{% bootstrap_form payment_form %}
{% bootstrap_form billing_address_form %}
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Place order" context "Checkout payment primary action" %}
</button>
</form>
diff --git a/templates/checkout/shipping_address.html b/templates/checkout/shipping_address.html
index a560b3d587..8e05bd1c37 100644
--- a/templates/checkout/shipping_address.html
+++ b/templates/checkout/shipping_address.html
@@ -6,17 +6,18 @@
<form method="post" novalidate class="checkout__shipping">
{% csrf_token %}
<h2>{% trans "Shipping address" context "Checkout shipping address title" %}</h2>
- {% if request.user.is_authenticated %}
- {% include "checkout/snippets/addresses_form.html" with addresses_form=user_form addresses=additional_addresses address_form=address_form only %}
- {% else %}
- {% bootstrap_form user_form %}
- {% include "account/snippets/address_form.html" with address_form=address_form only %}
- {% endif %}
+ <div class="checkout__addresses">
- <p class="text-md-right">
- <button type="submit" class="btn primary">
+ {% if request.user.is_authenticated %}
+ {% include "checkout/snippets/addresses_form.html" with addresses_form=user_form addresses=additional_addresses address_form=address_form only %}
+ {% else %}
+ {% bootstrap_form user_form %}
+ {% include "account/snippets/address_form.html" with address_form=address_form only %}
+ {% endif %}
+
+ <button type="submit" class="btn btn-primary">
{% trans "Continue" context "Checkout shipping address primary action" %}
</button>
- </p>
+ </div>
</form>
{% endblock %}
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index bae50f6eb5..1653a6aa75 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -1,29 +1,52 @@
{% extends "checkout/details.html" %}
{% load i18n %}
{% load i18n_address_tags %}
-{% load bootstrap_form from bootstrap4 %}
{% block forms %}
- <h3>{% trans "Shipping address" context "Checkout shipping address title" %}</h3>
- {% format_address cart.shipping_address %}
- <p><a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a></p>
- <hr>
- {% if shipping_method_form.shipping_method.field.choices %}
- <form method="post" novalidate>
- {% csrf_token %}
- <h2>{% trans "Shipping method" context "Checkout shipping method form title" %}</h2>
- {% bootstrap_form shipping_method_form show_label=False %}
- <p class="text-md-right">
- <button type="submit" class="btn primary">
- {% trans "Continue" context "Checkout shipping method primary action" %}
- </button>
- </p>
- </form>
- {% else %}
- {% blocktrans context "Message displayed to the user if there's no shipping methods for his country" %}
- Unfortunately we do not ship to your selected country.
- <br>
- Please enter an alternative shipping address or contact us, if you think that's a mistake.
- {% endblocktrans %}
- {% endif %}
+ <div class="checkout__shipping-methods">
+ <h3>{% trans "Shipping address" context "Checkout shipping address title" %}</h3>
+ <div class="card card-default address">
+ <div class="card-body">
+ {% format_address cart.shipping_address %}
+ </div>
+ </div>
+ <p>
+ <a href="{% url 'checkout:shipping-address' %}">
+ {% trans "Select other address" %}
+ </a>
+ </p>
+ <hr>
+ {% if shipping_method_form.shipping_method.field.choices %}
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h2>
+ {% trans "Shipping method" context "Checkout shipping method form title" %}
+ </h2>
+ <div class="checkout__shipping-methods-form">
+ {% for choice in shipping_method_form.shipping_method %}
+ <div class="radio">
+ <label>
+ <div class="card card-default">
+ <div class="card-body">
+ <strong>
+ {{choice}}
+ </strong>
+ </div>
+ </div>
+ </label>
+ </div>
+ {% endfor %}
+ <button type="submit" class="btn btn-primary">
+ {% trans "Continue" context "Checkout shipping method primary action" %}
+ </button>
+ </div>
+ </form>
+ {% else %}
+ {% blocktrans context "Message displayed to the user if there's no shipping methods for his country" %}
+ Unfortunately we do not ship to your selected country.
+ <br>
+ Please enter an alternative shipping address or contact us, if you think that's a mistake.
+ {% endblocktrans %}
+ {% endif %}
+ </div>
{% endblock %}
diff --git a/templates/checkout/snippets/addresses_form.html b/templates/checkout/snippets/addresses_form.html
index 83b1381ea1..d68380b14e 100644
--- a/templates/checkout/snippets/addresses_form.html
+++ b/templates/checkout/snippets/addresses_form.html
@@ -1,14 +1,13 @@
{% load i18n %}
-<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
- {% if addresses_form.SHIPPING_ADDRESS %}
- {% trans "Same as shipping" context "Checkout addresses form label" as same_as_shipping %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=False radio_name=addresses_form.address.html_name radio_value=addresses_form.SHIPPING_ADDRESS label=same_as_shipping value=addresses_form.address.value only %}
- {% endif %}
- {% for address in addresses %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=False radio_name=addresses_form.address.html_name radio_value=address.id label=address value=addresses_form.address.value address=address only %}
- {% endfor %}
- {% if addresses_form.NEW_ADDRESS and address_form %}
- {% trans "Enter a new address" context "Checkout addresses form label" as enter_a_new_address %}
- {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=True radio_name=addresses_form.address.html_name radio_value=addresses_form.NEW_ADDRESS label=enter_a_new_address value=addresses_form.address.value address_form=address_form only %}
- {% endif %}
-</div>
+
+{% if addresses_form.SHIPPING_ADDRESS %}
+ {% trans "Same as shipping" context "Checkout addresses form label" as same_as_shipping %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=False radio_name=addresses_form.address.html_name radio_value=addresses_form.SHIPPING_ADDRESS label=same_as_shipping value=addresses_form.address.value only %}
+{% endif %}
+{% for address in addresses %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=False radio_name=addresses_form.address.html_name radio_value=address.id label=address value=addresses_form.address.value address=address only %}
+{% endfor %}
+{% if addresses_form.NEW_ADDRESS and address_form %}
+ {% trans "Enter a new address" context "Checkout addresses form label" as enter_a_new_address %}
+ {% include "checkout/snippets/addresses_form_panel.html" with parent_element_id="accordion" address_show=True radio_name=addresses_form.address.html_name radio_value=addresses_form.NEW_ADDRESS label=enter_a_new_address value=addresses_form.address.value address_form=address_form only %}
+{% endif %}
diff --git a/templates/checkout/snippets/addresses_form_panel.html b/templates/checkout/snippets/addresses_form_panel.html
index 3adad51703..80dfe4a4cc 100644
--- a/templates/checkout/snippets/addresses_form_panel.html
+++ b/templates/checkout/snippets/addresses_form_panel.html
@@ -1,17 +1,21 @@
{% load i18n_address_tags %}
- <div class="radio {% if not address_show %} address_hide{% else %} address_show{% endif %}">
+ <div class="checkout__addresses-panel radio {% if not address_show %} address_hide{% else %} address_show{% endif %}">
<label>
- <input type="radio" name="{{ radio_name }}" value="{{ radio_value }}" id="address_{{ radio_value }}" {% if radio_value == value %}checked{% endif %}>
- {% if address %}
- <div class="address-details">
- {% format_address address %}
+ <div class="card card-default">
+ <div class="card-body">
+ <input type="radio" name="{{ radio_name }}" value="{{ radio_value }}" id="address_{{ radio_value }}" {% if radio_value == value %}checked{% endif %}>
+ {% if address %}
+ <div class="address-details">
+ {% format_address address %}
+ </div>
+ {% else %}
+ {{ label }}
+ {% endif %}
</div>
- {% else %}
- {{ label }}
- {% endif %}
+ </div>
</label>
</div>
-<div>
+<div class="checkout__new-address-container">
{% if address_form %}
<div class="checkout__new-address">
{% include "account/snippets/address_form.html" with address_form=address_form only %}
diff --git a/templates/checkout/summary.html b/templates/checkout/summary.html
index b124c34c96..de9e6f00b7 100644
--- a/templates/checkout/summary.html
+++ b/templates/checkout/summary.html
@@ -11,7 +11,7 @@
<h2>{% trans "Add a note to your order" context "Checkout summary note title" %}</h2>
{% bootstrap_form note_form show_label=False %}
<p class="text-md-right">
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Order & Pay" context "Checkout summary primary action" %}
</button>
</p>
diff --git a/templates/checkout/summary_without_shipping.html b/templates/checkout/summary_without_shipping.html
index 1233ae9ce7..bac8514c6b 100644
--- a/templates/checkout/summary_without_shipping.html
+++ b/templates/checkout/summary_without_shipping.html
@@ -15,7 +15,7 @@
<h2>{% trans "Add a note to your order" context "Checkout summary without shipping note title" %}</h2>
{% bootstrap_form note_form show_label=False %}
<p class="text-md-right">
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Place order" context "Checkout summary without shipping action" %}
</button>
</p>
diff --git a/templates/order/checkout_success_anonymous.html b/templates/order/checkout_success_anonymous.html
index fc0efe8168..8e55a74615 100644
--- a/templates/order/checkout_success_anonymous.html
+++ b/templates/order/checkout_success_anonymous.html
@@ -43,7 +43,7 @@
</fieldset>
<div class="row login__btn-group">
<div class="col-12">
- <button class="btn primary">
+ <button class="btn btn-primary">
{% trans "Create an account" context "Checkout primary action" %}
</button>
</div>
diff --git a/templates/order/details.html b/templates/order/details.html
index 52235f5347..c7dd484505 100644
--- a/templates/order/details.html
+++ b/templates/order/details.html
@@ -56,7 +56,7 @@
{% trans "Payment details" context "Order details link text" %}
</a>
{% else %}
- <a href="{% url "order:payment" token=order.token %}" class="btn primary">
+ <a href="{% url "order:payment" token=order.token %}" class="btn btn-primary">
{% trans "Pay for order" context "Order details primary action" %}
</a>
{% endif %}
@@ -72,7 +72,7 @@
{% csrf_token %}
<h2>{% trans "Add a note to your order" context "Order note title" %}</h2>
{% bootstrap_form note_form display_labels=False %}
- <input type="submit" value="{% trans 'Submit note' context 'Customer panel - order details: add note submit button' %}" class="btn primary" />
+ <input type="submit" value="{% trans 'Submit note' context 'Customer panel - order details: add note submit button' %}" class="btn btn-primary" />
</form>
{% endif %}
</div>
diff --git a/templates/order/payment.html b/templates/order/payment.html
index e760681f5a..9d26a1060d 100644
--- a/templates/order/payment.html
+++ b/templates/order/payment.html
@@ -77,7 +77,7 @@
{% csrf_token %}
{{ payment_form }}
{% block form_submit %}
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Proceed to payment" context "Payment details primary action" %}
</button>
{% endblock %}
diff --git a/templates/order/payment/braintree.html b/templates/order/payment/braintree.html
index 0eef053d6e..94a9a75b5e 100644
--- a/templates/order/payment/braintree.html
+++ b/templates/order/payment/braintree.html
@@ -24,7 +24,7 @@
<input type="hidden" id="nonce" name="payment_method_nonce"/>
<input type="hidden" id="amount" name="amount" value="{{ payment.total }}"/>
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Make payment" context "Payment form primary action" %}
</button>
</div>
diff --git a/templates/order/payment/dummy.html b/templates/order/payment/dummy.html
index 0c9a1a3ec4..ac0c399a6b 100644
--- a/templates/order/payment/dummy.html
+++ b/templates/order/payment/dummy.html
@@ -16,7 +16,7 @@
<div class="form-group">
<div class="col-sm-2"></div>
<div class="col-sm-10">
- <button type="submit" class="btn primary">
+ <button type="submit" class="btn btn-primary">
{% trans "Make payment" context "Payment form primary action" %}
</button>
</div>
diff --git a/templates/product/details.html b/templates/product/details.html
index bebcc3524d..1540663689 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -174,7 +174,7 @@
</div>
<div class="form-group product__info__button">
- <button class="btn primary">
+ <button class="btn btn-primary">
{% trans "Add to cart" context "Product details primary action" %}
</button>
</div>
diff --git a/templates/styleguide.html b/templates/styleguide.html
index b204e8ab7b..db7be68de2 100644
--- a/templates/styleguide.html
+++ b/templates/styleguide.html
@@ -340,7 +340,7 @@
<p>Click and edit any button below to see how the component looks with different text</p>
</div>
<div class="styleguide__section">
- <button class="btn primary">
+ <button class="btn btn-primary">
<span contenteditable="true">Primary Button (buttons can be really very wide)</span>
</button>
<button class="btn secondary">
@@ -349,13 +349,13 @@
<button class="btn danger">
<span contenteditable="true">Danger Button</span>
</button>
- <button class="btn primary disabled">
+ <button class="btn btn-primary disabled">
<span contenteditable="true">Disabled Button</span>
</button>
<button class="btn gray">
<span contenteditable="true">Gray Button</span>
</button>
- <button class="btn primary narrow">
+ <button class="btn btn-primary narrow">
<span contenteditable="true">Primary Narrow Button</span>
</button>
<button class="btn secondary narrow">