Skip to content

Commit

Permalink
Cleanup updated billing information
Browse files Browse the repository at this point in the history
  • Loading branch information
fditrapani committed Sep 9, 2020
1 parent 930f6d2 commit 38a48d1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
16 changes: 14 additions & 2 deletions components.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function renderEmailTemplate( $title, $content ) {
<tr>
<td align="left">
$halfVerticalSpacer
<a href="https://wordpress.com">
<a href="/">
<img src="images/wordpress-logo.png" alt="WordPress.com logo" width="170" border="0"/>
</a>
</td>
Expand Down Expand Up @@ -253,10 +253,22 @@ function renderTextLink( $text, $textColor = '#353535', $size = "16px" ){
return $textLink;
}

function renderHiddenTextLink( $text, $textColor = '#353535', $size = "16px" ){
$color = include("colors.php");
$text = renderRegularText( $text, $textColor, $size );
$textLink = <<<EOD
<a href='#' class='text-link' style='color: $textColor; text-decoration: none;'>
$text
</a>
EOD;

return $textLink;
}

function renderHorizontalRule() {
$color = include("colors.php");

return "<hr size='1' noshade color='$color[border]' />";
return "<hr size='1' noshade color='$color[border]' style='margin: 0' />";
}

function renderBillingHistory( $title = "Billing history"){
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
7 => '<a href="expiring-card.php" class="text-link">' . renderRegularText("Expiring card") . '</a>',
8 => '<a href="renewal-failure.php" class="text-link">' . renderRegularText("Renewal failure") . '</a>',
9 => '<a href="refund.php" class="text-link">' . renderRegularText("Refund") . '</a>',
10 => '<a href="updated-payment-method.php" class="text-link">' . renderRegularText("Updated billing information") . '</a>',
10 => '<a href="updated-billing-info.php" class="text-link">' . renderRegularText("Updated billing information") . '</a>',
11 => '<a href="cancelled-plan.php" class="text-link">' . renderRegularText("Cancelled plan") . '</a>',
12 => '<a href="cancelled-subscriptions.php" class="text-link">' . renderRegularText("Cancelled subscription") . '</a>',
12 => '<a href="suspended.php" class="text-link">' . renderRegularText("Suspended site") . '</a>',
Expand Down
2 changes: 1 addition & 1 deletion suspended.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$product = renderItem(
"WordPress.com Personal",
$color["error"],
"Removed",
"Suspended",
"Plan for " . renderTextLink("Filippo Di Trapani"),
false,
true
Expand Down
19 changes: 8 additions & 11 deletions updated-payment-method.php → updated-billing-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,27 @@
$verticalSpacer = renderVerticalSpacer( "40px" );
$halfVerticalSpacer = renderVerticalSpacer( "20px" );

$billingContent = renderBillingHistory();

$recentPurchaseTitle = renderBoldText("Recently renewed");
$recentPurchaseDetails = renderItem(
"filippodt.com",
$color['success'],
"Renewed for $20 on July 22, 2020",
".com domain registration" );
$billingTitle = renderSecondaryTitle('Account information');
$billingContent = renderBoldText('fditrapani') . "<br/>" .
renderHiddenTextLink('[email protected]') . "<br/>" .
renderTextLink('Manage account');

$supportContent = renderSupport();

$content = <<<EOD
$horizontalRule
$halfVerticalSpacer
$creditCard
$product
$halfVerticalSpacer
$horizontalRule
$halfVerticalSpacer
$product
$creditCard
$halfVerticalSpacer
$horizontalRule
$verticalSpacer
$halfVerticalSpacer
$billingContent
$halfVerticalSpacer
$supportContent
EOD;
Expand Down

0 comments on commit 38a48d1

Please sign in to comment.