Commit 6b684b03 by François C.

Make possibility to create full binome from scratch optionnal

parent dfe92735
...@@ -105,6 +105,7 @@ def inscriptions(request, type=1): ...@@ -105,6 +105,7 @@ def inscriptions(request, type=1):
'show_ftop_button': getattr(settings, 'SHOW_FTOP_BUTTON', True), 'show_ftop_button': getattr(settings, 'SHOW_FTOP_BUTTON', True),
'db': settings.COUCHDB['dbs']['member'], 'db': settings.COUCHDB['dbs']['member'],
'ASSOCIATE_MEMBER_SHIFT' : getattr(settings, 'ASSOCIATE_MEMBER_SHIFT', ''), 'ASSOCIATE_MEMBER_SHIFT' : getattr(settings, 'ASSOCIATE_MEMBER_SHIFT', ''),
'can_create_binome': getattr(settings, 'CAN_CREATE_BINOME', True),
'prepa_odoo_url' : getattr(settings, 'PREPA_ODOO_URL', '/members/prepa-odoo'), 'prepa_odoo_url' : getattr(settings, 'PREPA_ODOO_URL', '/members/prepa-odoo'),
'committees_shift_id': committees_shift_id, 'committees_shift_id': committees_shift_id,
} }
......
...@@ -131,6 +131,10 @@ ...@@ -131,6 +131,10 @@
La Cagette use False to implement custom rules La Cagette use False to implement custom rules
- CAN_CREATE_BINOME = True (by default)
If set to False, in new member creation form, a member can be selected to be associated with.
- ASSOCIATE_MEMBER_SHIFT = '' - ASSOCIATE_MEMBER_SHIFT = ''
Id number of the associate shift template Id number of the associate shift template
......
...@@ -79,16 +79,18 @@ ...@@ -79,16 +79,18 @@
</p> </p>
{% endif %} {% endif %}
{% if ASSOCIATE_MEMBER_SHIFT %} {% if can_create_binome %}
<p id="add_binome" >+ Binomes (facultatif)</p> <p id="add_binome" >+ Binomes (facultatif)</p>
<div id="associate_area" style="display:none;"> <div id="associate_area" style="display:none;">
<div class="choice_button_area d-flex" > <div class="choice_button_area d-flex" >
<div id="existing_member_choice" class="member_choice"> <div id="existing_member_choice" class="member_choice">
A mettre en binome avec un.e membre existant.e A mettre en binome avec un.e membre existant.e
</div> </div>
{% if ASSOCIATE_MEMBER_SHIFT %}
<div id="new_member_choice" class="member_choice"> <div id="new_member_choice" class="member_choice">
A mettre en binome avec un.e nouveau membre A mettre en binome avec un.e nouveau membre
</div> </div>
{% endif %}
</div> </div>
<div id="existing_member_choice_action" style="display:none;"> <div id="existing_member_choice_action" style="display:none;">
...@@ -110,6 +112,7 @@ ...@@ -110,6 +112,7 @@
</div> </div>
</div> </div>
</div> </div>
{% if ASSOCIATE_MEMBER_SHIFT %}
<div id="new_member_choice_action" style="display:none;"> <div id="new_member_choice_action" style="display:none;">
<div > <div >
<div> <div>
...@@ -117,6 +120,7 @@ ...@@ -117,6 +120,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endif %}
</div> </div>
{% endif %} {% endif %}
<div> <div>
......
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