~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/billing-change-period.html -rw-r--r-- 2.0 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends "layout.html" %}
{% block title %}
<title>Update billing period - {{cfg("sr.ht", "site-name")}}</title>
{% endblock %}
{% block content %}
<div class="row">
  <div class="col-md-4">
    <p>
      Thank you for supporting {{cfg("sr.ht", "site-name")}}!
      {% if current_user.user_type != UserType.active_paying %}
      You will be charged when you click "submit payment", and your plan will
      be automatically renewed at the end of the term.
      {% endif %}
    </p>
  </div>
  <div class="col-md-8">
    <h3>Confirm subscription details</h3>
    <form method="POST" id="payment-form">
      {{csrf_token()}}
      <fieldset style="margin-bottom: 1rem">
        <legend style="font-weight: bold">Payment term</legend>
        <div class="form-check form-check-inline">
          <input
            class="form-check-input"
            type="radio"
            name="term"
            id="term-monthly"
            value="monthly"
            checked>
          <label class="form-check-label" for="term-monthly">
            ${{"{:.2f}".format(current_user.payment_cents / 100)}} per month
          </label>
        </div>
        <div class="form-check form-check-inline">
          <input
            class="form-check-input"
            type="radio"
            name="term"
            id="term-yearly"
            value="yearly">
          <label class="form-check-label" for="term-yearly">
            ${{"{:.2f}".format(current_user.payment_cents / 100 * 10)}} per year
          </label>
        </div>
      </fieldset>
      <div class="form-group">
        <button class="btn btn-primary" type="submit">
          Submit changes
          {{icon('caret-right')}}
        </button>
      </div>
      {% if current_user.user_type == UserType.active_paying %}
      <div class="alert alert-info">
        Your account is paid for and up-to-date. These changes will take effect
        at the start of your next billing period
        ({{current_user.payment_due | date}}).
      </div>
      {% endif %}
    </form>
  </div>
</div>
{% endblock %}