Commit 3cbf6c15 by François C.

Fit code for Supercoop Coolisses shift easy validation

parent 552143d0
...@@ -805,7 +805,7 @@ html_elts.image_medium.on('click', function() { ...@@ -805,7 +805,7 @@ html_elts.image_medium.on('click', function() {
function ask_for_easy_shift_validation() { function ask_for_easy_shift_validation() {
//alert("operator = " + JSON.stringify(operator)) //alert("operator = " + JSON.stringify(operator))
msg = "<p>Je suis bien " + operator.name + "<br/> et <br/>je valide mon service 'Comité' </p>"; msg = "<p>Je suis bien " + operator.name + "<br/> et <br/>je valide mon service '" + window.committees_shift_name + "' </p>";
openModal(msg, function() { openModal(msg, function() {
try { try {
post_form( post_form(
...@@ -867,7 +867,7 @@ function display_possible_members() { ...@@ -867,7 +867,7 @@ function display_possible_members() {
}); });
} }
} else { } else {
$('.search_member_results').html('<p><i>Aucun résultat ! Faites-vous partie d\'un comité ? <br/> Si oui, vérifiez la recherche..</i></p>'); $('.search_member_results').html('<p><i>Aucun résultat ! Faites-vous partie des ' + window.committees_shift_name + ' ? <br/> Si oui, vérifiez la recherche..</i></p>');
} }
} }
$(document).ready(function() { $(document).ready(function() {
......
...@@ -48,6 +48,7 @@ def index(request): ...@@ -48,6 +48,7 @@ def index(request):
return HttpResponse("Le créneau des comités n'est pas configuré dans Odoo !") return HttpResponse("Le créneau des comités n'est pas configuré dans Odoo !")
else: else:
context['committees_shift_id'] = committees_shift_id context['committees_shift_id'] = committees_shift_id
context['committees_shift_name'] = getattr(settings, 'COMMITTEES_SHIFT_NAME', "Comités")
if 'no_picture_member_advice' in msettings: if 'no_picture_member_advice' in msettings:
if len(msettings['no_picture_member_advice']['value']) > 0: if len(msettings['no_picture_member_advice']['value']) > 0:
......
...@@ -2,6 +2,7 @@ from django.db import models ...@@ -2,6 +2,7 @@ from django.db import models
from outils.common_imports import * from outils.common_imports import *
from outils.common import OdooAPI from outils.common import OdooAPI
from members.models import CagetteMember
from pytz import timezone from pytz import timezone
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
window.late_mode = {% if LATE_MODE %}true{% else %}false{% endif %}; window.late_mode = {% if LATE_MODE %}true{% else %}false{% endif %};
{% if committees_shift_id %} {% if committees_shift_id %}
window.committees_shift_id = {{committees_shift_id}}; window.committees_shift_id = {{committees_shift_id}};
window.committees_shift_name = '{{committees_shift_name}}';
{% endif %} {% endif %}
</script> </script>
<script src="{% static "js/webcam.min.js" %}"> <script src="{% static "js/webcam.min.js" %}">
......
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