Skip to main content

max / makenotwork

4.2 KB · 83 lines History Blame Raw
1 {% include "wizards/partials/step_nav.html" %}
2
3 <div class="wizard-step">
4 <h2 class="subtitle-h2">Pricing</h2>
5 <p class="step-description">How much should this item cost? 0% platform fee, only ~3% payment processing fee.</p>
6
7 <form hx-post="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/pricing"
8 hx-target="#wizard-step" hx-swap="innerHTML"
9 hx-push-url="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/preview"
10 novalidate>
11
12 <div class="pricing-cards">
13 <label class="card--selectable is-text-heavy">
14 <input type="radio" name="pricing_model" value="free"
15 {% if pricing_model == "free" %}checked{% endif %}
16 data-change="updatePricingFields">
17 <span class="card--selectable-inner">
18 <span class="card--selectable-label">Free</span>
19 <span class="card--selectable-desc">No charge. Available to everyone.</span>
20 </span>
21 </label>
22
23 <label class="card--selectable is-text-heavy">
24 <input type="radio" name="pricing_model" value="fixed"
25 {% if pricing_model == "fixed" %}checked{% endif %}
26 data-change="updatePricingFields">
27 <span class="card--selectable-inner">
28 <span class="card--selectable-label">One-Time Purchase</span>
29 <span class="card--selectable-desc">Set a specific price for this item.</span>
30 </span>
31 </label>
32
33 <label class="card--selectable is-text-heavy">
34 <input type="radio" name="pricing_model" value="pwyw"
35 {% if pricing_model == "pwyw" %}checked{% endif %}
36 data-change="updatePricingFields">
37 <span class="card--selectable-inner">
38 <span class="card--selectable-label">Pay What You Want</span>
39 <span class="card--selectable-desc">Buyers choose their price above a minimum.</span>
40 </span>
41 </label>
42 </div>
43
44 <div id="pricing-fields-fixed" class="pricing-fields {% if pricing_model != "fixed" %}hidden{% endif %}">
45 <div class="form-group">
46 <label for="wiz-price">Price</label>
47 <input type="number" id="wiz-price" name="price" min="0.50" step="0.01"
48 value="{{ price_dollars }}" placeholder="5.00"
49 aria-describedby="wiz-price-unit">
50 <span class="form-unit" id="wiz-price-unit">USD</span>
51 </div>
52 </div>
53
54 <div id="pricing-fields-pwyw" class="pricing-fields {% if pricing_model != "pwyw" %}hidden{% endif %}">
55 <div class="form-group">
56 <label for="wiz-suggested">Suggested Price</label>
57 <input type="number" id="wiz-suggested" name="suggested_price" min="0" step="0.01"
58 value="{{ pwyw_suggested_dollars }}" placeholder="10.00"
59 aria-describedby="wiz-suggested-unit">
60 <span class="form-unit" id="wiz-suggested-unit">USD</span>
61 </div>
62 <div class="form-group">
63 <label for="wiz-min">Minimum Price</label>
64 <input type="number" id="wiz-min" name="min_price" min="0" step="0.01"
65 value="{{ pwyw_min_dollars }}" placeholder="0.00"
66 aria-describedby="wiz-min-unit wiz-min-hint">
67 <span class="form-unit" id="wiz-min-unit">USD</span>
68 <div class="hint" id="wiz-min-hint">Set to 0 to allow free downloads.</div>
69 </div>
70 </div>
71
72 <div class="wizard-actions">
73 <button type="button" class="btn-secondary"
74 hx-get="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/content"
75 hx-target="#wizard-step" hx-swap="innerHTML"
76 hx-push-url="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/content">Back</button>
77 <button type="submit" class="btn-primary">Continue</button>
78 </div>
79 </form>
80 </div>
81
82 <script src="/static/wizard-item-pricing.js?v=0623"></script>
83