[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [donate/master] Remove h.twig for the promo end of December 2018.



commit 7c972cccdfaed1b7c18b0f2a7d4b5f37b5df99dd
Author: Stephanie Kirtiadi <skirtiadi@xxxxxxxxxxxxxxx>
Date:   Mon Feb 25 17:32:02 2019 -0800

    Remove h.twig for the promo end of December 2018.
---
 public/js/payment_controller.js |   1 -
 src/DonateController.php        |  12 --
 templates/h.twig                | 298 ----------------------------------------
 3 files changed, 311 deletions(-)

diff --git a/public/js/payment_controller.js b/public/js/payment_controller.js
index e283d805..9573d6e1 100644
--- a/public/js/payment_controller.js
+++ b/public/js/payment_controller.js
@@ -11349,7 +11349,6 @@ function PaymentController(paypalMerchantId, environmentName, stripePublishableK
 }
 
 PaymentController.prototype.init = function() {
-  this.setupCampaignTotals();
   this.setInitialPromoAdjustments();
   this.setPriceSet();
   this.setRecurring();
diff --git a/src/DonateController.php b/src/DonateController.php
index 9a13d953..83a8aeb6 100644
--- a/src/DonateController.php
+++ b/src/DonateController.php
@@ -17,9 +17,6 @@ class DonateController extends BaseController {
     $now = $this->environment_info->now();
 
     $templateToRender = 'index.twig';
-    if ($this->is_promo($now)) {
-      $templateToRender = 'h.twig';
-    }
 
     $config = PPConfigManager::getConfigWithDefaults();
     $stripeConfig = StripeConfig::setup();
@@ -71,13 +68,4 @@ class DonateController extends BaseController {
     }
     return TRUE;
   }
-
-  function is_promo($now) {
-    $dec2018CampaignStartDate = \DateTime::createFromFormat('Y-m-j-H:i:s', '2018-12-26-05:00:00', new \DateTimeZone('UTC'));
-    $dec2018CampaignEndDate = \DateTime::createFromFormat('Y-m-j-H:i:s', '2018-12-30-04:59:59', new \DateTimeZone('UTC'));
-    if ($now < $dec2018CampaignEndDate && $now > $dec2018CampaignStartDate) {
-      return TRUE;
-    }
-    return FALSE;
-  }
 }
diff --git a/templates/h.twig b/templates/h.twig
deleted file mode 100644
index 02f3da8b..00000000
--- a/templates/h.twig
+++ /dev/null
@@ -1,298 +0,0 @@
-{% extends("ubiquitous.twig") %}
-
-{% block title %}
-  {% trans %}Support the Tor Project Today!{% endtrans %}
-{% endblock %}
-
-{% block head %}
-  <meta property="og:url" content="{{ baseUrl }}" />
-  <meta property="og:type" content="article" />
-  <meta property="og:title" content="{% trans %}Tor: Strength in Numbers{% endtrans %}" />
-  <meta property="og:description" content="{% trans %}Donate to the Tor Project and protect the privacy of millions.{% endtrans %} {% trans %}Anonymity loves company.{% endtrans %}" />
-  <meta property="og:image" content="{{ baseUrl }}/images/og-image-strength-in-numbers.png" />
-
-  <meta name="twitter:card" content="{% trans %}summary_large_image{% endtrans %}" />
-  <meta name="twitter:site" content="{% trans %}@torproject{% endtrans %}" />
-  <meta name="twitter:title" content="{% trans %}Tor: Strength in Numbers{% endtrans %}" />
-  <meta name="twitter:description" content="{% trans %}Donate to the Tor Project and protect the privacy of millions.{% endtrans %} {% trans %}Anonymity loves company.{% endtrans %}" />
-  <meta name="twitter:image" content="{{ baseUrl }}/images/og-image-strength-in-numbers.png" />
-{% endblock %}
-
-{% block header %}
-  {% embed "header_with_image.twig" %}
-    {% block header_text %}
-      <h1>{% trans %}Tor: Strength in Numbers{% endtrans %}</h1>
-      {% if isMatchingDonation %}
-        <h4>{% trans %}Stand up for the universal human rights to privacy and freedom and help keep Tor robust and secure.{% endtrans %} <b>{% trans %}Mozilla will match your gift and double your impact.{% endtrans %}</b></h4>
-      {% else %}
-        <h4>{% trans %}Stand up for the universal human rights to privacy and freedom and help keep Tor robust and secure.{% endtrans %}</h4>
-      {% endif %}
-    {% endblock %}
-  {% endembed %}
-{% endblock %}
-
-{% block content %}
-  <noscript>
-    <div class="donate-options perk-title" style="padding: 20px;">
-      {% trans %}This page requires Javascript to do PayPal or credit card
-      donations, but it appears you have Javascript disabled.{% endtrans %}
-      {% trans %}If you wish to donate without enabling Javascript, please take a look at our <a href="https://www.torproject.org/donate/donate-options.html.en";>other donations options page</a>.{% endtrans %}
-    </div>
-  </noscript>
-  {% if isMatchingDonation %}
-    <div class="campaign-totals-area">
-      <div class="supporters">
-        <div class="background-grey characters">
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>0</div>
-        </div>
-        <div class="label">
-          {% trans %}Number of Donations{% endtrans %}
-        </div>
-      </div>
-      <div class="total-donated">
-        <div class="background-grey characters">
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>0</div>
-        </div>
-        <div class="label">
-          {% trans %}Total Donated{% endtrans %}
-        </div>
-      </div>
-      <div class="total-matched">
-        <div class="background-grey characters">
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>1</div>
-          <div class="character"><div class="cover"></div>0</div>
-          <div class="character"><div class="cover"></div>0</div>
-        </div>
-        <div class="label">
-          {% trans %}Total Raised with Mozilla's Match{% endtrans %}
-        </div>
-      </div>
-    </div>
-  {% endif %}
-  <div class="donate-options">
-    <a class="button once-button selected" data-recurring="once" href="#" id="donate-once-button">{% trans %}donate{% endtrans %} <span class="bold">{% trans %}once{% endtrans %}</span></a>
-    <a class="button monthly-button" href="#" id="donate-monthly-button">{% trans %}donate{% endtrans %} <span class="bold" data-recurring="monthly">{% trans %}monthly{% endtrans %}</span>
-    </a>
-  </div>
-  <div class="payment-other-div">
-    <a class="hyperlinks links" href="https://www.torproject.org/donate/donate-options.html.en";>{% trans %}Want to donate Bitcoin, Stock, or via snail mail?{% endtrans %}</a>
-  </div>
-
-  <form action="/donate" method="POST" id="donationForm">
-    <div class="donation-selection-area">
-      <div class="donate-buttons">
-        <a class="price-btn" data-price-in-cents="1000" href="#">$10</a>
-        <a class="price-btn" data-price-in-cents="2500" href="#">$25</a>
-        <a class="price-btn promo selected" data-perk="stickers" data-price-in-cents="6000" href="#">$60</a>
-        <a class="price-btn" data-perk="t-shirt" data-price-in-cents="12500" href="#">$125</a>
-        <a class="price-btn" data-perk="t-shirt-pack" data-price-in-cents="25000" href="#">$250</a>
-        <a class="price-btn" data-perk="t-shirt-pack" data-price-in-cents="50000" href="#">$500</a>
-        <div class="other-amount-field">
-          <div class="error invalid-amount" style="display: none;">{% trans %}invalid amount{% endtrans %}</div>
-          <div class="error donate-amount-min" style="display: none;">{% trans %}$2 minimum donation{% endtrans %}</div>
-          <input class="perk-amt" data-name="Other Amount" id="otherAmount" maxlength="256" name="otherAmount" placeholder="{% trans %}$ other{% endtrans %}" type="text">
-        </div>
-      </div>
-      <div class="perk-intro">
-        <h2 class="perk-title">{% trans %}Choose your gift as a token of our thanks.{% endtrans %}</h2>
-      </div>
-      <div class="no-perk-area">
-        <input id="no-perk-checkbox" name="no-perk-checkbox" type="checkbox" checked="true">
-        <label for="no-perk-checkbox">{% trans %}No thanks, I don't want a gift.{% endtrans %} {% trans %}I would prefer 100% of my donation to go to the Tor Project's work.{% endtrans %}</label>
-      </div>
-      <div class="perks">
-        <div class="perk" data-perk="stickers" data-once-price-in-cents="2500" data-monthly-price-in-cents="1000">
-          <div class="price-tag-group">
-            <div class="price-tag">Once $25</div>
-            <div class="price-tag">Monthly $10</div>
-          </div>
-          <h4 class="perk-label">{% trans %}sticker Pack{% endtrans %}</h4>
-          <div class="slides">
-            <img src="/images/Stickerpack-1.png" width="300" height="225">
-          </div>
-          <div class="perk-desc">{% trans %}A collection of our favorite logo stickers for decorating your stuff and covering your cams.{% endtrans %}</div>
-        </div>
-        <div class="perk selected" data-perk="t-shirt" data-once-price-in-cents="6000" data-monthly-price-in-cents="2500">
-          <div class="price-tag-group">
-            <div class="price-tag"><span class="promo-strike-through">Once $75</span> <span class="promo-price">NOW</span> <span class="promo-price large">$60</span></div>
-            <div class="price-tag">Monthly $25</div>
-          </div>
-          <h4 class="perk-label t-shirt">{% trans %}t-shirt{% endtrans %}</h4>
-          <div class="slides">
-            <img class="perk-img wide-img" data-perk-image="strength-in-numbers" src="/images/tor-tshirt-strength-in-numbers.png" aria-hidden="true" width="214" height="179">
-            <div class="promo-red-dot">{% trans %}$15{% endtrans %}<br /><span class="light">{% trans %}OFF{% endtrans %}</span></div>
-          </div>
-          <div class="perk-desc">
-	          {% trans %}Get our limited edition Tor: Strength in Numbers shirt.{% endtrans %}
-          </div>
-        </div>
-        <div class="perk" data-perk="t-shirt-pack" data-once-price-in-cents="12500" data-monthly-price-in-cents="5000">
-          <div class="price-tag-group">
-            <div class="price-tag">Once $125</div>
-            <div class="price-tag">Monthly $50</div>
-          </div>
-          <h4 class="perk-label">{% trans %}t-shirt pack{% endtrans %}</h4>
-          <div class="slides">
-            <img class="perk-img" data-perk-image="heart-of-internet" src="/images/t-shirt-pack-strength-numbers-heart.png" width="198" height="140">
-            <img class="perk-img" data-perk-image="pdr" src="/images/t-shirt-pack-strength-numbers-pdr.png" width="198" style="display: none;">
-            <img class="perk-img" data-perk-image="ooni" src="/images/t-shirt-pack-strength-numbers-ooni.png" width="198" style="display: none;">
-          </div>
-          <div class="perk-desc">
-	          {% trans %}Our Tor: Strength in Numbers t-shirt, plus one of either our Tor: Powering the Digital Resistance, Open Observatory of Network Interference (OONI), or Tor at the Heart of Internet Freedom t-shirts.{% endtrans %}
-          </div>
-          <select class="perk-sub-select field input">
-            <option value="heart-of-internet">{% trans %}Tor at the Heart of Internet Freedom{% endtrans %}</option>
-            <option value="pdr">{% trans %}Powering the Digital Resistance{% endtrans %}</option>
-            <option value="ooni">{% trans %}Open Observatory of Network Interference{% endtrans %}</option>
-          </select>
-        </div>
-        <div class="perk" data-perk="sweatshirt" data-once-price-in-cents="50000" data-monthly-price-in-cents="10000">
-          <div class="price-tag-group">
-            <div class="price-tag">Once $500</div>
-            <div class="price-tag">Monthly $100</div>
-          </div>
-          <h4 class="perk-label">{% trans %}sweatshirt{% endtrans %}</h4>
-          <div class="slides">
-            <img src="/images/sweatshirt-strength-in-numbers.png" width="400" height="283">
-          </div>
-          <div class="perk-desc">{% trans %}Your generous support of Tor gets you this high-quality zip hoodie.{% endtrans %}</div>
-        </div>
-      </div>
-      <div class="totals-area"></div>
-    </div>
-    <div class="payment-method-area">
-      <h4 class="payment-method-question">
-        {% trans %}how do you want to <span class="green">DONATE</span>?{% endtrans %}
-      </h4>
-      <div class="payment-option">
-        <a class="button credit-card selected payment-method" data-payment-method="credit_card" href="#">{% trans %}Credit Card{% endtrans %}</a>
-        <div class="button paypal payment-method" data-payment-method="paypal">
-          <img class="paypal paypal-png" src="/images/PayPal.svg.png">
-        </div>
-      </div>
-      <div class="payment-other-div">
-        <a class="hyperlinks links" href="https://www.torproject.org/donate/donate-options.html.en";>{% trans %}Want to donate Bitcoin, Stock, or via snail mail?{% endtrans %}</a>
-      </div>
-    </div>
-    <div class="info-area">
-      <h4 class="info-txt">{% trans %}Your Info{% endtrans %}</h4>
-      <div class="required">{% trans %}* required fields{% endtrans %}</div>
-      <div class="field-row">
-        <input class="field" data-name="firstName" id="firstName" maxlength="256" name="firstName" placeholder="{% trans %}First Name{% endtrans %}" type="text">
-        <input class="field" data-name="lastName" id="lastName" maxlength="256" name="lastName" placeholder="{% trans %}Last Name{% endtrans %}" type="text">
-      </div>
-      <div class="field-row">
-        <input class="field" data-name="streetAddress" id="streetAddress" maxlength="256" name="streetAddress" placeholder="{% trans %}Street Address{% endtrans %}" type="text" data-stripe="address_line1">
-        <input class="field" data-name="extendedAddress" id="extendedAddress" maxlength="256" name="extendedAddress" placeholder="{% trans %}Apt.{% endtrans %}" type="text">
-      </div>
-      <div class="field-row">
-        <select class="field" data-name="country" id="country" name="country" data-stripe="address_country">
-        </select>
-      </div>
-      <div class="field-row">
-        <input class="field" data-name="locality" id="locality" maxlength="256" name="locality" placeholder="{% trans %}City{% endtrans %}" type="text" data-stripe="address_city">
-        <select class="field" data-name="region" id="region" name="region" data-stripe="address_state" aria-label="{% trans %}State{% endtrans %}">
-        </select>
-        <input class="field" data-name="postalCode" id="postalCode" maxlength="256" name="postalCode" placeholder="{% trans %}Zip{% endtrans %}" type="text" data-stripe="address_zip">
-      </div>
-      <div class="field-row">
-        <input class="field" data-name="email" id="email" maxlength="256" name="email" placeholder="{% trans %}Enter email{% endtrans %}" type="text" data-stripe="name">
-        <div class="receipt light">{% trans %}We&lsquo;ll email you your receipt{% endtrans %}</div>
-      </div>
-      <div class="field-row">
-        <input data-name="mailingListOptIn" id="mailingListOptIn" name="mailingListOptIn" type="checkbox">
-        <label class="light" for="mailingListOptIn">{% trans %}Start sending me email updates about the Tor Project!{% endtrans %}</label>
-      </div>
-      <div class="credit-card-form-wrapper">
-        <div class="field-row">
-          <input class="field" type="text" size="20" data-stripe="number" placeholder="{% trans %}Card Number{% endtrans %}" id="cardNumber">
-          <img class="credit-cards" src="/images/credit-cards.png">
-        </div>
-        <div class="field-row">
-          <input class="field" class="input month" type="text" size="2" data-stripe="exp_month" placeholder="{% trans %}MM{% endtrans %}" id="expMonth">
-          <input class="field" class="input year" type="text" size="2" data-stripe="exp_year" placeholder="{% trans %}YY{% endtrans %}" id="expYear">
-          <input class="field" class="cvc input" type="text" size="4" data-stripe="cvc" placeholder="{% trans %}CVC{% endtrans %}" id="cvc">
-        </div>
-      </div>
-      <div id="perk-fields">
-        <div class="perk-fields-instructions strong">
-          {% trans %}Choose your size and fit.{% endtrans %}
-        </div>
-        <div id="selected-perk-fields-label">{% trans %}T-shirt:{% endtrans %}</div>
-        {{ include('shirt-options.twig', {id_suffix: '1', include_style: true}) }}
-        <div id="selected-perk-fields-label-2" style="display: none;">{% trans %}T-shirt:{% endtrans %}</div>
-        {{ include('shirt-options.twig', {id_suffix: '2'}) }}
-      </div>
-      <div id="donate-comments-wrapper">
-        <div class="strong">{% trans %}Comments{% endtrans %}</div>
-        <textarea id="donate-comments" name="comments"  aria-label="{% trans %}Comments{% endtrans %}" placeholder="{% trans %}Comments{% endtrans %}"></textarea>
-      </div>
-      <div class="donate-submit-area">
-        {% trans %}Donating:{% endtrans %}
-        <span id="donate-submit-amount"></span>
-      </div>
-      <div id="donate-submit-button">
-        <input class="donate button" type="submit" value="{% trans %}Donate{% endtrans %}">
-      </div>
-      <div class="donate" id="paypal-button-area">
-      </div>
-    </div>
-  </form>
-  <div class="js-translatable-strings" style="display: none;">
-    <div id="t-t-shirt__help-text">{% trans %}Choose your size and fit.{% endtrans %}</div>
-    <div id="t-t-shirt__friendly-name">{% trans %}T-Shirt{% endtrans %}</div>
-    <div id="t-t-shirt-pack__help-text">{% trans %}Choose your size and fit for each shirt.{% endtrans %}</div>
-    <div id="t-t-shirt-pack__friendly-name">{% trans %}Tor at the Heart of Internet, Powering Digital Resistance or Open Observvatory of Network Interference (OONI) T-Shirt{% endtrans %}</div>
-    <div id="t-t-shirt-pack-2__friendly-name">{% trans %}Strength in Numbers T-Shirt{% endtrans %}</div>
-    <div id="t-sweatshirt__help-text">{% trans %}Choose your size.{% endtrans %}</div>
-    <div id="t-sweatshirt__friendly-name">{% trans %}Sweatshirt{% endtrans %}</div>
-    <div id="t-missing-required-field-exception">{% trans %}A required field is missing from the form.{% endtrans %} {% trans %}Please reload the page and try again.{% endtrans %}</div>
-    <div id="t-payment-processor-failed">{% trans %}There was a problem submitting your request to the server:<br>{% endtrans %}</div>
-    <div id="t-validation-failed">{% trans %}validation failed{% endtrans %}</div>
-    <div id="t-field-required">
-      {% trans %}
-      __field_name__ must be filled out.
-      {% notes %}
-      __field_name__ will be replaced with the field name in the javascript.
-      {% endtrans %}
-    </div>
-    <div id="t-field-required-generic">{% trans %}This field is required{% endtrans %}</div>
-    <div id="t-invalid-email">{% trans %}Invalid email address.{% endtrans %}</div>
-    <div id="t-per-month">{% trans %}per month{% endtrans %}</div>
-  </div>
-  <div id="loading-dialog" class="loading-container" style="display: none;">
-    <div class="loading-dot-conatiner">
-      <div class="loading-circle"></div>
-      <div class="focus loading-circle"></div>
-      <div class="loading-circle"></div>
-      <div class="loading-circle"></div>
-      <div class="loading-circle"></div>
-    </div>
-    <h5 class="loading-message">
-      {% trans %}One moment while we shovel coal into our servers.{% endtrans %}
-    </h5>
-  </div>
-  <div id="loading-overlay" style="display: none;">
-  </div>
-  <script type="text/javascript" src="https://js.stripe.com/v2/";></script>
-  <script type="text/javascript" src="https://www.paypalobjects.com/api/checkout.js"; data-version-4></script>
-  <script src="/js/payment_controller.js" type="text/javascript"></script>
-  <script type="text/javascript">
-    document.addEventListener("DOMContentLoaded", function(event) {
-      var paymentController = new tor.PaymentController('{{paypalMerchantId}}', '{{environmentName}}', '{{stripePublishableKey}}', true);
-    });
-  </script>
-{% endblock %}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits