Commit 2b847e89 by Damien Moulard

access to unsuscribed form

parent 7ded1428
......@@ -115,6 +115,7 @@ valider votre présence en cherchant<br/>
votre nom ou numéro ci-dessous
"""
# Members space / shifts
UNSUBSCRIBED_FORM_LINK = 'https://docs.google.com/forms/d/e/1FAIpQLScWcpls-ruYIp7HdrjRF1B1TyuzdqhvlUIcUWynbEujfj3dTg/viewform'
UNSUBSCRIBED_MSG = 'Vous êtes désincrit·e, merci de remplir <a href="https://docs.google.com/forms/d/e/1FAIpQLSfPiC2PkSem9x_B5M7LKpoFNLDIz0k0V5I2W3Mra9AnqnQunw/viewform">ce formulaire</a> pour vous réinscrire sur un créneau.<br />Vous pouvez également contacter le Bureau des Membres en remplissant <a href="https://docs.google.com/forms/d/e/1FAIpQLSeZP0m5-EXPVJxEKJk6EjwSyZJtnbiGdYDuAeFI3ENsHAOikg/viewform">ce formulaire</a>'
CONFIRME_PRESENT_BTN = 'Clique ici pour valider ta présence'
......
......@@ -97,13 +97,23 @@ body {
font-weight: bold;
}
#home_member_status_extra_info_area {
#home_member_status_action {
margin-bottom:20px;
font-size: 1.8rem;;
}
#home_choose_makeups {
display: none;
font-size: 1.8rem;;
}
#home_unsuscribed_form_link {
display: none;
text-decoration: none;
/* margin-bottom: 10px; */
}
#home_unsuscribed_form_link:hover,
#home_unsuscribed_form_link:active {
color: white !important;
}
.member_status_up_to_date,
......
......@@ -75,9 +75,10 @@ function init_my_shifts_tile() {
function init_my_info_tile() {
$("#home_choose_makeups").off();
$("#home_member_shift_name").text(partner_data.regular_shift_name);
// Status related
$("#home_tile_my_info #home_member_status")
$("#home_member_status")
.text(possible_cooperative_state[partner_data.cooperative_state])
.addClass("member_status_" + partner_data.cooperative_state);
......@@ -87,6 +88,17 @@ function init_my_info_tile() {
$("#home_delay_date_stop").text(f_date_delay_stop);
$("#home_delay_date_stop_container").show();
} else if (partner_data.cooperative_state === 'unsubscribed') {
$("#home_member_shift_name").text('X');
$("#home_unsuscribed_form_link")
.show()
.attr('href', unsuscribe_form_link)
.on('click', function() {
setTimeout(500, () => {
$(this).removeClass('active');
});
});
}
if (partner_data.makeups_to_do > 0) {
......@@ -112,10 +124,8 @@ function init_my_info_tile() {
}
}
$("#home_tile_my_info #home_member_shift_name").text(partner_data.regular_shift_name);
// TODO coop number for attached people ??
$("#home_tile_my_info #home_member_coop_number").text(partner_data.barcode_base);
$("#home_member_coop_number").text(partner_data.barcode_base);
}
function init_home() {
......
......@@ -27,7 +27,8 @@ def index(request, exception=None):
context = {
'title': 'Espace Membre',
'app_env': getattr(settings, 'APP_ENV', 'prod')
'app_env': getattr(settings, 'APP_ENV', 'prod'),
'unsuscribe_form_link': getattr(settings, 'UNSUBSCRIBED_FORM_LINK', ''),
}
template = loader.get_template('members_space/index.html')
......
......@@ -27,6 +27,3 @@ COMPANY_NAME = "Demo interfoodcoop"
SHOP_CATEGORIES = {}
EXCLUDE_SHOP_CATEGORIES = []
MIN_DELAY_FOR_SLOT = 4
# New members space
START_DATE_FOR_POINTS_HISTORY = "2018-01-01"
......@@ -289,6 +289,7 @@
- PB_INSTRUCTIONS = """Si j'ai un problème, que je suis désinscrit, que je veux changer de créneaux ou quoi que ce soit, merci de vous rendre dans la section \"J'ai un problème\" sur le site web de <a href=\"https://lacagette-coop.fr/?MonEspaceMembre\">La Cagette</a>"""
- UNSUBSCRIBED_FORM_LINK = 'https://docs.google.com/forms/d/e/1FAIpQLScWcpls-ruYIp7HdrjRF1B1TyuzdqhvlUIcUWynbEujfj3dTg/viewform'
- UNSUBSCRIBED_MSG = 'Vous êtes désincrit·e, merci de remplir <a href="https://docs.google.com/forms/d/e/1FAIpQLSfPiC2PkSem9x_B5M7LKpoFNLDIz0k0V5I2W3Mra9AnqnQunw/viewform">ce formulaire</a> pour vous réinscrire sur un créneau.<br />Vous pouvez également contacter le Bureau des Membres en remplissant <a href="https://docs.google.com/forms/d/e/1FAIpQLSeZP0m5-EXPVJxEKJk6EjwSyZJtnbiGdYDuAeFI3ENsHAOikg/viewform">ce formulaire</a>'
Message shown to people when they connect to the Member Space
......
......@@ -13,7 +13,10 @@
<div id="home_delay_date_stop_container">
( jusqu'au <span id="home_delay_date_stop"></span> )
</div>
<div id="home_member_status_extra_info_area">
<div id="home_member_status_action">
<a href="#" target="_blank" class="btn--primary" id="home_unsuscribed_form_link">
J'accède au formulaire
</a>
<button type="button" class="btn--danger" id="home_choose_makeups">
Je sélectionne mes rattrapages
</button>
......
......@@ -33,6 +33,7 @@
<script>
var app_env = '{{app_env}}';
var unsuscribe_form_link = '{{unsuscribe_form_link}}';
var partner_data = {
"partner_id":"{{partnerData.id}}",
"name":"{{partnerData.display_name}}",
......
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