Changeset - 568ea5d76267
[Not reviewed]
default
0 2 0
Dennis Fink - 3 years ago 2022-02-25 22:30:39
dennis.fink@c3l.lu
Rename digicash option
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
c3l_membership/templates/member.html
Show inline comments
 
@@ -98,27 +98,27 @@
 
            <li><b>{% trans %}Address:{% endtrans %}</b> {{ config["CRYPTOCURRENCIES"][form.payment.data]["ADDRESS"] }}</li>
 
            <li><b>{% trans %}Label:{% endtrans %}</b> Membership Fee</li>
 
            <li><b>{% trans %}Message:{% endtrans %}</b> {{ year }} {{ form.username.data }}</li>
 
            <li><b>{% trans %}Amount:{% endtrans %}</b> {{ price }} {{ config["CRYPTOCURRENCIES"][form.payment.data]["COMMODITY"] }}</li>
 
          </ul>
 
        </div>
 
        {% set address = config["CRYPTOCURRENCIES"][form.payment.data]["ADDRESS"] %}
 
        {% set crypto_url=config["CRYPTOCURRENCIES"][form.payment.data]["URL"].format(address=address, amount=price, year=year, username=form.username.data) %}
 
        <div><img class="cryptoqrcode" src="{{ qrcode(crypto_url) }}" /></div>
 
      </div>
 
    {% elif form.payment.data == 'digicash' %}
 
      <div class="digicash">
 
        {% set payoniq_url='https://payconiq.com/t/1/62068d4d71445b0006dfbd5d?A={amount}&R=Membership&D={username}'.format(amount=price, username=form.username.data)}
 
        <div><p>{% trans %}Pay with digicash!{% endtrans %}</p></div>
 
        <div><img src="{{ qrcode(payconiq_url) }}" /></div>
 
        {% set payconiq_url='https://payconiq.com/t/1/62068d4d71445b0006dfbd5d?A={amount}&R=Membership&D={username}'.format(amount=price, username=form.username.data) %}
 
        <div><p>{% trans %}Pay with DigiCash/Payconiq!{% endtrans %}</p></div>
 
        <div><img class="cryptoqrcode" src="{{ qrcode(payconiq_url) }}" /></div>
 
      </div>
 
    {% endif %}
 
    <div class="signature">
 
      <p class="membersignature">{% trans %}Luxembourg, the{% endtrans %}</p>
 
      <p class="adminsignature">
 
        {{ _("Signature of your legal representative") if form.minor_member.data else _("Your signature") }}
 
      </p>
 
    </div>
 
    <footer>
 
      <hr />
 
      <b>C</b>haos <b>C</b>omputer <b>C</b>lub <b>L</b>ëtzebuerg A.S.B.L.<br />
 
      Halle Victor Hugo - 60 Avenue Victor Hugo L-1750 Luxembourg (Europe)<br />
c3l_membership/views.py
Show inline comments
 
@@ -27,25 +27,25 @@ def pull_lang_code(endpoint, values):
 

	
 

	
 
@root_page.route("/", methods=("GET", "POST"))
 
def index():
 
    form = MembershipForm()
 

	
 
    choices = [
 
        ("cash", gettext("by cash")),
 
        ("wire transfer", gettext("by wire transfer")),
 
    ]
 

	
 
    if current_app.config["DIGICASH_ENABLED"]:
 
        choices.append(("digicash", gettext("by DigiCash")))
 
        choices.append(("digicash", gettext("by DigiCash/Payconiq")))
 

	
 
    choices.extend(
 
        (cryptocurrency_label, " ".join((gettext("by"), cryptocurrency_label.title())))
 
        for cryptocurrency_label, options in current_app.config[
 
            "CRYPTOCURRENCIES"
 
        ].items()
 
        if options["ENABLED"]
 
    )
 

	
 
    form.payment.choices = choices
 

	
 
    if form.validate_on_submit():
0 comments (0 inline, 0 general)