Skip to content

Commit

Permalink
Merge pull request canonical#14055 from canonical/WD-13087-correct-st…
Browse files Browse the repository at this point in the history
…ore-titles
  • Loading branch information
usamabinnadeem-10 authored Jul 10, 2024
2 parents 26e3af3 + 9e5b05e commit 9daccb4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 29 deletions.
63 changes: 36 additions & 27 deletions templates/account/checkout.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
{% extends "advantage/base_advantage.html" %}{% block title %}Buy Ubuntu Pro{% endblock %} {% block meta_description %}Ubuntu Pro offers a single, per-node packaging of the most comprehensive
software, security and IaaS support in the industry, with OpenStack support,
Kubernetes support included, and Livepatch, Landscape and Extended Security
Maintenance to address security and compliance concerns.{% endblock %} {% block
meta_copydoc
%}https://docs.google.com/document/d/1UqL8YJH9ywvOXnrt3syY0U8fiOakfAGWmLS9uerwAWk/edit{%
endblock meta_copydoc %} {% block content %}
{% extends "advantage/base_advantage.html" %}

<div id="shop-checkout-app">
<div class="p-strip">
{% block title %}{{ title }}{% endblock %}

{% block meta_description %}
Ubuntu Pro offers a single, per-node packaging of the most comprehensive
software, security and IaaS support in the industry, with OpenStack support,
Kubernetes support included, and Livepatch, Landscape and Extended Security
Maintenance to address security and compliance concerns.
{% endblock %}

{% block
meta_copydoc
%}
https://docs.google.com/document/d/1UqL8YJH9ywvOXnrt3syY0U8fiOakfAGWmLS9uerwAWk/edit{%
endblock meta_copydoc %}

{% block content %}

<div id="shop-checkout-app">
<div class="p-strip">
<div class="u-fixed-width">
<h1 class="p-heading--2">
Checkout
</h1>
<h1 class="p-heading--2">Checkout</h1>
</div>
</div>
<div class="p-strip u-no-padding--top">
</div>
<div class="p-strip u-no-padding--top">
<div class="row">
<div class="u-no-margin--bottom p-card">
<div class="p-card__content">
<span class="p-text--default">
<i class="p-icon--spinner u-animation--spin"></i>
</span>
Loading…
</div>
<div class="u-no-margin--bottom p-card">
<div class="p-card__content">
<span class="p-text--default">
<i class="p-icon--spinner u-animation--spin"></i>
</span>
Loading…
</div>
</div>
</div>
</div>
</div>
</div>

<script>
window.stripePublishableKey = "{{ get_stripe_publishable_key }}";
</script>
<script src="{{ versioned_static('js/dist/shopCheckout.js') }}" type="module"></script>
<script>
window.stripePublishableKey = "{{ get_stripe_publishable_key }}";
</script>
<script src="{{ versioned_static('js/dist/shopCheckout.js') }}" type="module"></script>

{% endblock %}
{% endblock %}
4 changes: 2 additions & 2 deletions templates/credentials/shop/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "credentials/base_cred.html" %}

{% block title %}Canonical Certification{% endblock %}
{% block title %}Canonical Credentials{% endblock %}

{% block meta_description %}
The Canonical Ubuntu Essentials exams certify knowledge and verify skills in general Linux,
Expand Down Expand Up @@ -173,7 +173,7 @@ <h5 id="exam-price" class="u-align--right" style="padding-right: 1rem">
}
})
);
location.href = "/account/checkout";
location.href = "/account/checkout?title=Buy Canonical Credentials";
};

document.getElementsByName("exam-radio").forEach(function(e) {
Expand Down
2 changes: 2 additions & 0 deletions webapp/shop/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def support(**kwargs):

@shop_decorator(area="account", permission="user", response="html")
def checkout(advantage_mapper, **kwargs):
title = flask.request.args.get("title", "Buy Ubuntu Pro")
try:
advantage_mapper.get_purchase_account("canonical-ua")
except UAContractsUserHasNoAccount:
Expand All @@ -347,6 +348,7 @@ def checkout(advantage_mapper, **kwargs):
)
return flask.render_template(
"account/checkout.html",
title=title,
)


Expand Down

0 comments on commit 9daccb4

Please sign in to comment.