text change
Some checks failed
Deploy / build-deploy (push) Has been cancelled

This commit is contained in:
Jorijn van der Graaf 2026-08-17 11:16:49 +02:00
commit 5be98cff96
2 changed files with 16 additions and 16 deletions

View file

@ -695,11 +695,11 @@ SafeHtml RenderPayFieldset(const Form::Checkout& prev, SafeHtml payError) {
R"(<legend>How you want to pay</legend>)" R"(<legend>How you want to pay</legend>)"
R"(<label class="pay-option">)" R"(<label class="pay-option">)"
R"(<input type="radio" name="pay"{}{}>)" R"(<input type="radio" name="pay"{}{}>)"
R"(<span><strong>Bank or card</strong> &mdash; iDEAL, card, or a plain )" R"(<span><strong>Bank or card</strong> iDEAL, card, or a plain )"
R"(bank transfer. Handled by Mollie.</span></label>)" R"(bank transfer. Handled by Mollie.</span></label>)"
R"(<label class="pay-option">)" R"(<label class="pay-option">)"
R"(<input type="radio" name="pay"{}{}>)" R"(<input type="radio" name="pay"{}{}>)"
R"(<span><strong>Cryptocurrency</strong> &mdash; EURC, a euro )" R"(<span><strong>Cryptocurrency</strong> EURC, a euro )"
R"(stablecoin, paid from your own wallet. The amount to send is the )" R"(stablecoin, paid from your own wallet. The amount to send is the )"
R"(euro total exactly, no exchange rate; the receiving address and )" R"(euro total exactly, no exchange rate; the receiving address and )"
R"(the networks it takes appear on the order page, and stay reserved )" R"(the networks it takes appear on the order page, and stay reserved )"
@ -766,7 +766,7 @@ SafeHtml RenderCheckoutForm(const Product& product,
std::vector<SafeHtml> colorOpts; std::vector<SafeHtml> colorOpts;
for (const Variant& v : product.variants) { for (const Variant& v : product.variants) {
colorOpts.push_back(Format( colorOpts.push_back(Format(
R"(<option{}{}>{} &mdash; {}</option>)", R"(<option{}{}>{} {}</option>)",
Attr("value", v.slug), Attr("value", v.slug),
(selected && selected->slug == v.slug) ? Raw(" selected") : SafeHtml{}, (selected && selected->slug == v.slug) ? Raw(" selected") : SafeHtml{},
Escape(v.label), Escape(Money::FormatEuro(v.priceInclMinor)))); Escape(v.label), Escape(Money::FormatEuro(v.priceInclMinor))));
@ -912,7 +912,7 @@ SafeHtml RenderCheckoutForm(const Product& product,
// Hidden without JS — the customs note already promises the total is // Hidden without JS — the customs note already promises the total is
// stated on the order page before paying. // stated on the order page before paying.
R"(<p class="checkout__total" id="cc-total" hidden></p>)" R"(<p class="checkout__total" id="cc-total" hidden></p>)"
R"(<button class="btn btn--primary" type="submit">Order &mdash; continue to payment</button>)" R"(<button class="btn btn--primary" type="submit">Order continue to payment</button>)"
R"(</form>)" R"(</form>)"
R"(</section>)", R"(</section>)",
// With the choice rendered below, the fieldset lists the methods and // With the choice rendered below, the fieldset lists the methods and
@ -994,7 +994,7 @@ SafeHtml RenderDonationForm(const Product& product,
R"(<label for="f-website">Leave this empty</label>)" R"(<label for="f-website">Leave this empty</label>)"
R"(<input id="f-website" name="website" type="text" tabindex="-1" autocomplete="off">)" R"(<input id="f-website" name="website" type="text" tabindex="-1" autocomplete="off">)"
R"(</div>)" R"(</div>)"
R"(<button class="btn btn--primary" type="submit">Donate &mdash; continue to payment</button>)" R"(<button class="btn btn--primary" type="submit">Donate</button>)"
R"(</form>)" R"(</form>)"
R"(</section>)", R"(</section>)",
offerCrypto ? SafeHtml{} offerCrypto ? SafeHtml{}
@ -1234,7 +1234,7 @@ export RenderedPage RenderProduct(const Product& product,
// small print at the bottom is the pattern this shop exists to not do. // small print at the bottom is the pattern this shop exists to not do.
SafeHtml safety = product.safetyNote.empty() ? SafeHtml{} : Format( SafeHtml safety = product.safetyNote.empty() ? SafeHtml{} : Format(
R"(<p class="notice notice--warn product__safety">)" R"(<p class="notice notice--warn product__safety">)"
R"(<strong>Safety warning &mdash; emergency calls.</strong> {}</p>)", R"(<strong>Safety warning emergency calls.</strong> {}</p>)",
Escape(product.safetyNote)); Escape(product.safetyNote));
SafeHtml buy; SafeHtml buy;
@ -1249,7 +1249,7 @@ export RenderedPage RenderProduct(const Product& product,
std::vector<SafeHtml> colorRows; std::vector<SafeHtml> colorRows;
for (const Variant& v : product.variants) { for (const Variant& v : product.variants) {
colorRows.push_back(Format( colorRows.push_back(Format(
R"(<li>{} &mdash; {}</li>)", R"(<li>{} {}</li>)",
Escape(v.label), Escape(Money::FormatEuro(v.priceInclMinor)))); Escape(v.label), Escape(Money::FormatEuro(v.priceInclMinor))));
} }
buy = Format( buy = Format(
@ -1366,7 +1366,7 @@ export RenderedPage RenderOrderStatus(const OrderView& o, std::string_view indic
R"(<li><strong>{}</strong>{}{}<br>)" R"(<li><strong>{}</strong>{}{}<br>)"
R"(<small>EURC contract <code>{}</code></small></li>)", R"(<small>EURC contract <code>{}</code></small></li>)",
Escape(label), Escape(label),
c.note.empty() ? SafeHtml{} : Format(" &mdash; {}", Escape(c.note)), c.note.empty() ? SafeHtml{} : Format(" {}", Escape(c.note)),
c.link.empty() ? SafeHtml{} c.link.empty() ? SafeHtml{}
: Format(R"( &middot; <a{}>open in your wallet</a>)", : Format(R"( &middot; <a{}>open in your wallet</a>)",
Url("href", c.link)), Url("href", c.link)),
@ -1386,7 +1386,7 @@ export RenderedPage RenderOrderStatus(const OrderView& o, std::string_view indic
pay.minutesLeft >= 120 ? Raw("hours") : Raw("minutes")) pay.minutesLeft >= 120 ? Raw("hours") : Raw("minutes"))
: Raw(R"(<p class="order__note">The payment window for this order has )" : Raw(R"(<p class="order__note">The payment window for this order has )"
R"(closed and the order will lapse. If you already sent EURC it )" R"(closed and the order will lapse. If you already sent EURC it )"
R"(is not lost &mdash; it arrived at the address above; contact )" R"(is not lost it arrived at the address above; contact )"
R"(<a href="mailto:info@catcrafts.net">info@catcrafts.net</a> )" R"(<a href="mailto:info@catcrafts.net">info@catcrafts.net</a> )"
R"(and it will be settled by hand.</p>)"); R"(and it will be settled by hand.</p>)");
@ -1398,13 +1398,13 @@ export RenderedPage RenderOrderStatus(const OrderView& o, std::string_view indic
payBlock = Format( payBlock = Format(
R"(<section class="section">)" R"(<section class="section">)"
R"(<h2 class="section__title">Pay with EURC</h2>)" R"(<h2 class="section__title">Pay with EURC</h2>)"
R"(<p>Send <strong>{} EURC</strong> to this address &mdash; one )" R"(<p>Send <strong>{} EURC</strong> to this address one )"
R"(network, one payment:</p>)" R"(network, one payment:</p>)"
R"(<p><code class="order__address">{}</code></p>)" R"(<p><code class="order__address">{}</code></p>)"
R"(<ul class="order__chains">{}</ul>)" R"(<ul class="order__chains">{}</ul>)"
R"({})" R"({})"
R"(<p class="order__note">EURC is pegged to the euro, so the amount )" R"(<p class="order__note">EURC is pegged to the euro, so the amount )"
R"(is exactly the euro total &mdash; no exchange rate. Send EURC only, )" R"(is exactly the euro total no exchange rate. Send EURC only, )"
R"(and only on a network listed above. If your exchange deducts a )" R"(and only on a network listed above. If your exchange deducts a )"
R"(withdrawal fee, send the missing rest to the same address; the )" R"(withdrawal fee, send the missing rest to the same address; the )"
R"(order confirms once the full amount sits on one network. Your )" R"(order confirms once the full amount sits on one network. Your )"
@ -1432,7 +1432,7 @@ export RenderedPage RenderOrderStatus(const OrderView& o, std::string_view indic
R"(<section class="section">)" R"(<section class="section">)"
R"(<h2 class="section__title">Complete your payment</h2>)" R"(<h2 class="section__title">Complete your payment</h2>)"
R"({})" R"({})"
R"(<p><a class="btn btn--primary" rel="noreferrer"{}>Resume payment &mdash; {}</a></p>)" R"(<p><a class="btn btn--primary" rel="noreferrer"{}>Resume payment {}</a></p>)"
R"(<p class="order__note">{} your order reference is <strong>{}</strong>. )" R"(<p class="order__note">{} your order reference is <strong>{}</strong>. )"
R"(If you just paid, this page confirms it within seconds. {} Nothing )" R"(If you just paid, this page confirms it within seconds. {} Nothing )"
R"(is owed.</p>)" R"(is owed.</p>)"
@ -1450,7 +1450,7 @@ export RenderedPage RenderOrderStatus(const OrderView& o, std::string_view indic
payBlock = o.donation payBlock = o.donation
? Raw(R"(<section class="section"><h2 class="section__title">Thank you</h2>)" ? Raw(R"(<section class="section"><h2 class="section__title">Thank you</h2>)"
R"(<p>Your donation funds the open-source work directly. It will )" R"(<p>Your donation funds the open-source work directly. It will )"
R"(appear in the running total on the financials page &mdash; as )" R"(appear in the running total on the financials page as )"
R"(an aggregate, never individually. This page is your receipt; )" R"(an aggregate, never individually. This page is your receipt; )"
R"(no invoice is issued for a donation.</p>)" R"(no invoice is issued for a donation.</p>)"
R"(</section>)") R"(</section>)")

View file

@ -28,8 +28,8 @@ int main(int argc, char** argv) {
srv.BodyHas("/shop", "€573.80", "shop card shows the from-price"); srv.BodyHas("/shop", "€573.80", "shop card shows the from-price");
// Every colour is priced in the selector, and the form carries the exact // Every colour is priced in the selector, and the form carries the exact
// data blob the preview computes from. // data blob the preview computes from.
srv.BodyHas("/shop/fp6-pmos", "Black &mdash; €579.80", "colour selector prices black"); srv.BodyHas("/shop/fp6-pmos", "Black €579.80", "colour selector prices black");
srv.BodyHas("/shop/fp6-pmos", "White &mdash; €665.38", "colour selector prices white"); srv.BodyHas("/shop/fp6-pmos", "White €665.38", "colour selector prices white");
if (srv.ShopOpen()) { if (srv.ShopOpen()) {
srv.BodyHas("/shop/fp6-pmos", "data-cc=", "form embeds the pricing blob"); srv.BodyHas("/shop/fp6-pmos", "data-cc=", "form embeds the pricing blob");
srv.BodyHas("/shop/fp6-pmos", "id=\"cc-total\"", "live total element present"); srv.BodyHas("/shop/fp6-pmos", "id=\"cc-total\"", "live total element present");
@ -44,7 +44,7 @@ int main(int argc, char** argv) {
srv.BodyHas("/shop", "/shop/donation", "shop grid lists the donation item"); srv.BodyHas("/shop", "/shop/donation", "shop grid lists the donation item");
srv.BodyHas("/shop", "any amount", "donation card quotes no price"); srv.BodyHas("/shop", "any amount", "donation card quotes no price");
srv.BodyHas("/shop/donation", "name=\"amount\"", "donation form asks for an amount"); srv.BodyHas("/shop/donation", "name=\"amount\"", "donation form asks for an amount");
srv.BodyHas("/shop/donation", "Donate &mdash; continue to payment", srv.BodyHas("/shop/donation", "Donate continue to payment",
"donation form submits to payment"); "donation form submits to payment");
srv.BodyLacks("/shop/donation", "name=\"street\"", srv.BodyLacks("/shop/donation", "name=\"street\"",
"donation form asks no address — nothing ships"); "donation form asks no address — nothing ships");