diff --git a/services/web/app/src/Features/Subscription/TeamInvitesController.js b/services/web/app/src/Features/Subscription/TeamInvitesController.js index 7a415184af..6af825d5e8 100644 --- a/services/web/app/src/Features/Subscription/TeamInvitesController.js +++ b/services/web/app/src/Features/Subscription/TeamInvitesController.js @@ -69,6 +69,13 @@ async function viewInvite(req, res, next) { const { invite, subscription } = await TeamInvitesHandler.promises.getInvite(token) + + await SplitTestHandler.promises.getAssignment( + req, + res, + 'bootstrap-5-subscription' + ) + if (!invite) { return ErrorController.notFound(req, res) } diff --git a/services/web/app/views/subscriptions/team/invite-managed.pug b/services/web/app/views/subscriptions/team/invite-managed.pug index 935094d79a..8260db2562 100644 --- a/services/web/app/views/subscriptions/team/invite-managed.pug +++ b/services/web/app/views/subscriptions/team/invite-managed.pug @@ -1,5 +1,9 @@ extends ../../layout-marketing +block vars + - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' + - bootstrap5PageSplitTest = 'bootstrap-5-subscription' + block entrypointVar - entrypoint = 'pages/user/subscription/invite-managed' diff --git a/services/web/app/views/subscriptions/team/invite.pug b/services/web/app/views/subscriptions/team/invite.pug index 803de6a72d..c5ff57528b 100644 --- a/services/web/app/views/subscriptions/team/invite.pug +++ b/services/web/app/views/subscriptions/team/invite.pug @@ -1,9 +1,12 @@ extends ../../layout-marketing +block vars + - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' + - bootstrap5PageSplitTest = 'bootstrap-5-subscription' + block entrypointVar - entrypoint = 'pages/user/subscription/invite' - block append meta meta(name="ol-hasIndividualRecurlySubscription" data-type="boolean" content=hasIndividualRecurlySubscription) meta(name="ol-inviterName" date-type="string" content=inviterName) @@ -14,4 +17,4 @@ block append meta meta(name="ol-subscriptionId" data-type="string" content=subscriptionId) block content - main.content.content-alt#invite-root \ No newline at end of file + main.content.content-alt#invite-root diff --git a/services/web/app/views/subscriptions/team/invite_logged_out.pug b/services/web/app/views/subscriptions/team/invite_logged_out.pug index bfd2a8e949..cac4cc37cd 100644 --- a/services/web/app/views/subscriptions/team/invite_logged_out.pug +++ b/services/web/app/views/subscriptions/team/invite_logged_out.pug @@ -1,24 +1,31 @@ extends ../../layout-marketing +block vars + - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' + - bootstrap5PageSplitTest = 'bootstrap-5-subscription' + block content + - var colClass = bootstrapVersion === 5 ? 'col-lg-8 m-auto' : 'col-md-8 col-md-offset-2' + main.content.content-alt.team-invite#main-content .container .row - .col-md-8.col-md-offset-2.text-center - .card - .page-header - h1.text-centered !{translate("invited_to_group", {inviterName: inviterName, appName: appName }, [{name: 'span', attrs: {class: 'team-invite-name'}}])} - - if (accountExists) - div - p #{translate("invited_to_group_login_benefits", {appName: appName})} - p #{translate("invited_to_group_login", {emailAddress: emailAddress})} - p - a.btn.btn.btn-primary(href=`/login?redir=/subscription/invites/${inviteToken}`) #{translate("login_to_accept_invitation")} - else - div - p #{translate("invited_to_group_register_benefits", {appName: appName})} - p #{translate("invited_to_group_register", {inviterName: inviterName})} - p - a.btn.btn.btn-primary(href=`/register?redir=/subscription/invites/${inviteToken}`) #{translate("register_to_accept_invitation")} + div(class=colClass) + .card.text-center + .card-body + .page-header + // TODO: Remove `team-invite-name` once we fully migrated to Bootstrap 5 + h1.text-centered !{translate("invited_to_group", {inviterName: inviterName, appName: appName }, [{name: 'span', attrs: {class: 'team-invite-name'}}])} + if (accountExists) + div + p #{translate("invited_to_group_login_benefits", {appName: appName})} + p #{translate("invited_to_group_login", {emailAddress: emailAddress})} + p + a.btn.btn-primary(href=`/login?redir=/subscription/invites/${inviteToken}`) #{translate("login_to_accept_invitation")} + else + div + p #{translate("invited_to_group_register_benefits", {appName: appName})} + p #{translate("invited_to_group_register", {inviterName: inviterName})} + p + a.btn.btn-primary(href=`/register?redir=/subscription/invites/${inviteToken}`) #{translate("register_to_accept_invitation")} diff --git a/services/web/frontend/js/features/subscription/components/group-invite/group-invite.tsx b/services/web/frontend/js/features/subscription/components/group-invite/group-invite.tsx index 7f3587aef8..cc4bfe587f 100644 --- a/services/web/frontend/js/features/subscription/components/group-invite/group-invite.tsx +++ b/services/web/frontend/js/features/subscription/components/group-invite/group-invite.tsx @@ -7,6 +7,9 @@ import ManagedUserCannotJoin from './managed-user-cannot-join' import Notification from '@/shared/components/notification' import JoinGroup from './join-group' import AcceptedInvite from './accepted-invite' +import OLRow from '@/features/ui/components/ol/ol-row' +import OLCol from '@/features/ui/components/ol/ol-col' +import OLCard from '@/features/ui/components/ol/ol-card' export type InviteViewTypes = | 'invite' @@ -62,16 +65,16 @@ export default function GroupInvite() { return (
{t('cancel_personal_subscription_first')}
- + - +