Commit 9dd713a9 authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen

馃挬 Keeping YOLO changes

parent be9f84d6
......@@ -23,9 +23,10 @@
<button id="register-submit-btn" type="submit" class="btn btn-primary btn-lg" disabled>{% trans "Register card" %}</button>
<button type="reset" class="register-reset-btn btn btn-default">{% trans "Reset" %}</button>
{% if show_trial_membership %}
{# FIXME(nikolark): 2020-01-05 keeping yolo changes from server #}
{# {% if show_trial_membership %}#}
<br><br><input type="checkbox" class="" id="id_membership_trial" name="membership_trial" value="volunteer"><label for="id_membership_trial" title="{% trans "Expires January 1. next year" %}">{% trans "Trial membership" %}</label>
{% endif %}
{# {% endif %}#}
<br><br>
<button id="membership-submit-btn" type="submit" class="btn btn-default" disabled>{% trans "Renew membership only" %}</button>
......
......@@ -131,21 +131,28 @@ function updateMemberShipButton(user, order) {
}
/* ...or expiring soon and the user has a card */
// else if (user.last_membership.end_date <= todayPlusThirtyDays && user.active_member_card) {
// FIXME: ponas workaround 2019-12-17, block below commented out
_dom.membershipSubmitButton.prop('disabled', false);
/* ...with a membership that expires soon can renew */
else if (user.last_membership.end_date <= todayPlusThirtyDays) {
_dom.membershipSubmitButton.prop('disabled', false);
}
// else if (user.last_membership.end_date <= todayPlusThirtyDays) {
// _dom.membershipSubmitButton.prop('disabled', false);
// }
}
/* User with expired membership can renew */
// else if (user && !user.is_member && user.active_member_card) {
else if (user && !user.is_member) {
_dom.membershipSubmitButton.prop('disabled', false);
} else if (order) {
// FIXME: ponas workaround 2019-12-17, block below commented out
_dom.membershipSubmitButton.prop('disabled', false);
/* Order */
/* If the membership has expired it can be renewed */
if (!order.product.is_valid && order.product.end_date <= todayPlusThirtyDays) {
_dom.membershipSubmitButton.prop('disabled', false);
}
// if (!order.product.is_valid && order.product.end_date <= todayPlusThirtyDays) {
// _dom.membershipSubmitButton.prop('disabled', false);
// }
} else {
_dom.membershipSubmitButton.prop('disabled', true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment