Skip to main content

max / makenotwork

4.3 KB · 84 lines History Blame Raw
1 {% include "wizards/partials/step_nav.html" %}
2
3 <div class="wizard-step">
4 <h2 class="subtitle-h2">Monetization</h2>
5 <p class="step-description">Choose how people access your project. 0% platform fee, only ~3% payment processing fee.</p>
6
7 <form hx-post="/dashboard/new-project/{{ slug }}/step/monetization"
8 hx-target="#wizard-step" hx-swap="innerHTML"
9 hx-push-url="/dashboard/new-project/{{ slug }}/step/first-content">
10
11 {% if !stripe_connected %}
12 <div class="info-box mb-pane">
13 <strong>Stripe not connected.</strong> To accept payments, connect your Stripe account in
14 <a href="/dashboard">Dashboard &rarr; Payments</a>. You can still configure pricing now and connect later.
15 </div>
16 {% endif %}
17
18 <div class="form-group">
19 <label>Project pricing</label>
20 <select name="pricing_model" id="pricing-model" data-change="updatePricingUI">
21 <option value="free"{% if pricing_model == "free" %} selected{% endif %}>Free: anyone can access</option>
22 <option value="buy_once"{% if pricing_model == "buy_once" %} selected{% endif %}>One-time purchase</option>
23 <option value="pwyw"{% if pricing_model == "pwyw" %} selected{% endif %}>Pay what you want</option>
24 <option value="subscription"{% if pricing_model == "subscription" %} selected{% endif %}>Membership: recurring monthly</option>
25 </select>
26 </div>
27
28 <div id="buy-once-fields" class="hidden">
29 <div class="form-group">
30 <label for="price_dollars">Price</label>
31 <input type="number" name="price_dollars" id="price_dollars" min="0.50" max="10000" step="0.01"
32 placeholder="9.99" value="{{ price_dollars }}" disabled
33 aria-describedby="price_dollars-unit">
34 <span class="form-unit" id="price_dollars-unit">USD</span>
35 </div>
36 </div>
37
38 <div id="pwyw-fields" class="hidden">
39 <div class="form-group">
40 <label for="pwyw_min_dollars">Minimum price</label>
41 <input type="number" name="pwyw_min_dollars" id="pwyw_min_dollars" min="0" max="10000" step="0.01"
42 placeholder="0.00" value="{{ pwyw_min_dollars }}" disabled
43 aria-describedby="pwyw_min_dollars-unit pwyw_min_dollars-hint">
44 <span class="form-unit" id="pwyw_min_dollars-unit">USD</span>
45 <p class="form-hint" id="pwyw_min_dollars-hint">Set to 0 for no minimum.</p>
46 </div>
47 </div>
48
49 <div id="subscription-fields" class="hidden">
50 <div class="info-box mb-section">
51 Members get access to all paid items in this project.
52 Individual item pricing (pay-once, pay-what-you-want, free) is configured when you create each item.
53 </div>
54
55 <div id="tier-list">
56 {% for tier in tiers %}
57 <div class="tier-row">
58 <span class="tier-name">{{ tier.name }}</span>
59 <span class="tier-price">{{ tier.price_display }}/mo</span>
60 </div>
61 {% endfor %}
62 </div>
63 <div id="tier-forms"></div>
64 <button type="button" class="btn-secondary mt-peer"
65 data-action="addTierForm">Add Tier</button>
66 </div>
67
68 <div class="wizard-actions">
69 <button type="button" class="btn-secondary"
70 hx-get="/dashboard/new-project/{{ slug }}/step/appearance"
71 hx-target="#wizard-step" hx-swap="innerHTML"
72 hx-push-url="/dashboard/new-project/{{ slug }}/step/appearance">Back</button>
73 <button type="button" class="btn-secondary"
74 hx-get="/dashboard/new-project/{{ slug }}/step/first-content"
75 hx-target="#wizard-step" hx-swap="innerHTML"
76 hx-push-url="/dashboard/new-project/{{ slug }}/step/first-content">Skip</button>
77 <button type="submit" class="btn-primary">Continue</button>
78 </div>
79 </form>
80 </div>
81
82 <div id="wizard-project-monetization-cfg" hidden data-tier-count="{{ tiers.len() }}"></div>
83 <script src="/static/wizard-project-monetization.js?v=0623"></script>
84