Commit 9e8e9c73 by Damien Moulard

always access home after connection

parent 1f490c51
Pipeline #1455 passed with stage
in 1 minute 27 seconds
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
background-color: #00a573; background-color: #00a573;
color: white; color: white;
padding: 1.5rem 1.2rem; padding: 1.5rem 1.2rem;
display: none;
} }
@media screen and (max-width: 992px) { @media screen and (max-width: 992px) {
......
...@@ -48,7 +48,7 @@ $(document).ready(function() { ...@@ -48,7 +48,7 @@ $(document).ready(function() {
toggleHeader(); toggleHeader();
}); });
if (partner_data.is_associated_people !== "True") { if (partner_data.is_associated_people === "True") {
$(".pairs_info").hide(); $(".pairs_info").show();
} }
}); });
...@@ -39,6 +39,7 @@ def index(request, exception=None): ...@@ -39,6 +39,7 @@ def index(request, exception=None):
if 'msg' in credentials: if 'msg' in credentials:
context['msg'] = credentials['msg'] context['msg'] = credentials['msg']
context['password_placeholder'] = 'Naissance (jjmmaaaa)' context['password_placeholder'] = 'Naissance (jjmmaaaa)'
context['is_member_space'] = True
elif ('validation_state' in credentials) and credentials['validation_state'] == 'waiting_validation_member': elif ('validation_state' in credentials) and credentials['validation_state'] == 'waiting_validation_member':
# First connection, until the member validated his account # First connection, until the member validated his account
template = loader.get_template('members/validation_coop.html') template = loader.get_template('members/validation_coop.html')
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
</div> </div>
<div id="suspended_content" class="shifts_exchange_page_content"> <div id="suspended_content" class="shifts_exchange_page_content">
<h3> <h3>
J'ai <span class="makeups_nb"></span> rattrapages à effectuer, je dois les sélectionner pour pouvoir refaire mes courses. J'ai <span class="makeups_nb"></span> rattrapage(s) à effectuer, je dois le(s) sélectionner pour pouvoir refaire mes courses.
J'ai 6 mois de délai pour les rattraper. J'ai 6 mois de délai pour le(s) rattraper.
</h3> </h3>
<h3> <h3>
Si besoin, je peux contacter le Bureau des membres via la rubrique "J'ai une demande" pour expliquer ma situation. Si besoin, je peux contacter le Bureau des membres via la rubrique "J'ai une demande" pour expliquer ma situation.
......
...@@ -35,4 +35,19 @@ ...@@ -35,4 +35,19 @@
} }
</script> </script>
</div> </div>
<script>
// For the members space, reset url to home when accessing connect page
const is_member_space = '{{is_member_space}}';
if (is_member_space === "True") {
var app_env = '{{app_env}}';
var base_location = (app_env === 'dev') ? '/members_space/' : '/';
if (window.location.pathname === base_location) {
history.pushState({}, '', 'home');
} else {
history.replaceState({}, '', 'home');
}
}
</script>
{% endblock %} {% endblock %}
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